-
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
9d04987
commit 1760169
Showing
11 changed files
with
23 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,7 @@ | |
* Chrome functions for The Green Web addon | ||
* | ||
* @author Arend-Jan Tetteroo <[email protected]> | ||
* @copyright Cleanbits/The Green Web Foundation 2010-2017 | ||
* @copyright Cleanbits/The Green Web Foundation 2010-2020 | ||
*/ | ||
|
||
/** | ||
|
@@ -77,7 +77,7 @@ function getCurrentTime() | |
function getGreencheck(url, tabId) | ||
{ | ||
var currentTime = getCurrentTime(); | ||
|
||
var cache = window.localStorage.getItem(url); | ||
if (cache !== null) { | ||
// Item in cache, check cachetime | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,7 @@ | |
* Pagemod for all external links on site | ||
* | ||
* @author Arend-Jan Tetteroo <[email protected]> | ||
* @copyright Cleanbits/The Green Web Foundation 2010-2014 | ||
* @copyright Cleanbits/The Green Web Foundation 2010-2020 | ||
*/ | ||
|
||
/** | ||
|
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,10 @@ | ||
/* | ||
* Options page | ||
* | ||
* @author Arend-Jan Tetteroo <[email protected]> | ||
* @copyright Cleanbits/The Green Web Foundation 2010-2020 | ||
*/ | ||
|
||
/** | ||
* Saves options to Chrome storage api. | ||
* | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,7 @@ | |
* Bing search pagemod functions | ||
* | ||
* @author Arend-Jan Tetteroo <[email protected]> | ||
* @copyright Cleanbits/The Green Web Foundation 2010-2017 | ||
* @copyright Cleanbits/The Green Web Foundation 2010-2020 | ||
*/ | ||
|
||
/** | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,7 @@ | |
* Ecosia search pagemod functions (Based on bing search) | ||
* | ||
* @author Arend-Jan Tetteroo <[email protected]> | ||
* @copyright Cleanbits/The Green Web Foundation 2010-2017 | ||
* @copyright Cleanbits/The Green Web Foundation 2010-2020 | ||
*/ | ||
|
||
/** | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,7 @@ | |
* Google search pagemod functions | ||
* | ||
* @author Arend-Jan Tetteroo <[email protected]> | ||
* @copyright Cleanbits/The Green Web Foundation 2010-2017 | ||
* @copyright Cleanbits/The Green Web Foundation 2010-2020 | ||
*/ | ||
|
||
/** | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,7 @@ | |
* Yahoo search pagemod functions | ||
* | ||
* @author Arend-Jan Tetteroo <[email protected]> | ||
* @copyright Cleanbits/The Green Web Foundation 2010-2017 | ||
* @copyright Cleanbits/The Green Web Foundation 2010-2020 | ||
*/ | ||
|
||
/** | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,7 @@ | |
* Utilities for the greenweb add-on | ||
* | ||
* @author Arend-Jan Tetteroo <[email protected]> | ||
* @copyright Cleanbits/The Green Web Foundation 2010-2014 | ||
* @copyright Cleanbits/The Green Web Foundation 2010-2020 | ||
*/ | ||
|
||
/** | ||
|
@@ -156,12 +156,13 @@ function getImagePath(file) | |
icons.greenquestion = chrome.runtime.getURL("/images/greenquestion20x20.gif"); | ||
icons.greenfan = chrome.runtime.getURL("/images/greenfan20x20.gif"); | ||
icons.greenhouse = chrome.runtime.getURL("/images/greenhouse20x20.gif"); | ||
icons.goldsmiley = chrome.runtime.getURL("/images/goldsmiley20x20.png"); | ||
|
||
if (icons[file]) { | ||
return icons[file]; | ||
} | ||
|
||
return 'http://images.cleanbits.net/icons/' + file + "20x20.gif"; | ||
return 'https://api.thegreenwebfoundation.org/icons/' + file + "20x20.gif"; | ||
} | ||
|
||
/** | ||
|
@@ -227,14 +228,14 @@ function getTitleWithLink(data) | |
} | ||
if (data.green) { | ||
if (data.hostedby) { | ||
return data.url + ' ' + '<a target=\'_blank\' href=\'http://www.thegreenwebfoundation.org/thegreenweb/#/providers/' + data.hostedbyid + '\'>' + ' is sustainably hosted by ' + ' ' + data.hostedby + '</a>'; | ||
return data.url + ' ' + '<a target=\'_blank\' href=\'https://www.thegreenwebfoundation.org/thegreenweb/#/providers/' + data.hostedbyid + '\'>' + ' is sustainably hosted by ' + ' ' + data.hostedby + '</a>'; | ||
} | ||
return data.url + ' ' + 'is sustainably hosted'; | ||
} | ||
|
||
if (data.data === false) { | ||
// No data available, show help message | ||
return "No data available yet for this country domain. Wanna help? Contact us through " + " <a target=\'_blank\' href=\'http://www.thegreenwebfoundation.org\'>www.thegreenwebfoundation.org</a>"; | ||
return "No data available yet for this country domain. Wanna help? Contact us through " + " <a target=\'_blank\' href=\'https://www.thegreenwebfoundation.org\'>www.thegreenwebfoundation.org</a>"; | ||
} | ||
|
||
// Data available, so show grey site | ||
|