From 19ed9487cfaffea635d83e045bcf89a0e3770b49 Mon Sep 17 00:00:00 2001 From: Owocki Date: Wed, 31 Jan 2018 09:55:15 -0700 Subject: [PATCH] attempts at fixing this branch --- src/script/pageload/body.js | 3 ++- src/script/pageload/functions.js | 6 +++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/script/pageload/body.js b/src/script/pageload/body.js index 2f7349a..7d96e5d 100644 --- a/src/script/pageload/body.js +++ b/src/script/pageload/body.js @@ -23,7 +23,8 @@ var body = function(url) { } // Location | Issue Page - if (isOnIssuePage) { + if (isOnIssuePage && !isAlreadyGitcoinBounty) { + console.log(isAlreadyGitcoinBounty); addButtonToIssuePage(); addBountyInfoToIssuePage(url); injectGetBountyAmount(); diff --git a/src/script/pageload/functions.js b/src/script/pageload/functions.js index 9e470b0..3019922 100644 --- a/src/script/pageload/functions.js +++ b/src/script/pageload/functions.js @@ -22,7 +22,7 @@ var insertAfter = function(newNode, referenceNode) { getAllBounties = function(){ var bounties_api_url = 'https://gitcoin.co/api/v0.1/bounties/?network=mainnet&order_by=-web3_created'; var xmlHttp = new XMLHttpRequest(); - xmlHttp.open( "GET", bounties_api_url, true ); // true for asynchronous request + xmlHttp.open( "GET", bounties_api_url, true ); // for synchronous request or not xmlHttp.send( null ); return JSON.parse(xmlHttp.responseText); } @@ -30,7 +30,7 @@ getAllBounties = function(){ getBountiesForRepo = function(github_url) { var bounties_api_url = "https://gitcoin.co/api/v0.1/bounties/?network=mainnet&github_url=" + github_url; var xmlHttp = new XMLHttpRequest(); - xmlHttp.open( "GET", bounties_api_url, true ); // true for asynchronous request + xmlHttp.open( "GET", bounties_api_url, true ); // for synchronous request or not xmlHttp.send( null ); return JSON.parse(xmlHttp.responseText); } @@ -38,7 +38,7 @@ getBountiesForRepo = function(github_url) { getBountiesForKeyword = function(keyword) { var bounties_api_url = "https://gitcoin.co/api/v0.1/bounties/?order_by=web3_created&network=mainnet"; var xmlHttp = new XMLHttpRequest(); - xmlHttp.open( "GET", bounties_api_url, true ); // true for asynchronous request + xmlHttp.open( "GET", bounties_api_url, true ); // for synchronous request or not xmlHttp.send( null ); var all_bounties = JSON.parse(xmlHttp.responseText); matching_bounties = [];