-
-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update welcome and settings pages, remove HTTP/HTTPS switch
- Loading branch information
1 parent
953abfa
commit e3e17a2
Showing
7 changed files
with
48 additions
and
62 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
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,23 +1,19 @@ | ||
$(document).ready(function() { | ||
// Add version number to welcome page | ||
document.querySelector('.version').innerHTML = chrome.runtime.getManifest().version | ||
|
||
// Add version number to welcome page | ||
$(".version").html(" " + chrome.runtime.getManifest().version); | ||
// Add language to welcome page | ||
if (JSON.parse(localStorage.getItem("settings-modified")) == false) { | ||
document.querySelector(".language-warning").innerHTML = 'The search language has been auto-detected as <b>' + localStorage["full-language"] + ' (' + localStorage["language"] + ')</b>.<a class="btn btn-primary" href="settings.html" role="button">Change language</a>' | ||
} else { | ||
document.querySelector(".language-warning").innerHTML = 'The search language is currently set to <b>' + localStorage["full-language"] + ' (' + localStorage["language"] + ')</b>.<a class="btn btn-primary" href="settings.html" role="button">Change language</a>' | ||
} | ||
|
||
// Add language to welcome page | ||
if ($.parseJSON(localStorage.getItem("settings-modified")) == false) { | ||
$(".language-warning").html('The search language has been auto-detected as <b>' + localStorage["full-language"] + ' (' + localStorage["language"] + ')</b>.<a class="btn btn-primary" href="settings.html" role="button">Change language</a>'); | ||
} else { | ||
$(".language-warning").html('The search language is currently set to <b>' + localStorage["full-language"] + ' (' + localStorage["language"] + ')</b>.<a class="btn btn-primary" href="settings.html" role="button">Change language</a>'); | ||
} | ||
// Show instructions for leaving a review based on the browser being used | ||
var useragent = navigator.userAgent | ||
|
||
//Show instructions for leaving a review based on the browser being used | ||
var useragent = navigator.userAgent; | ||
|
||
// Opera has to be checked before Chrome, because Opera has both "Chrome" and "OPR" in the user agent string | ||
if (useragent.includes("OPR")) { | ||
$('.review-info').html('Also please leave a review on the <a href="https://addons.opera.com/en/extensions/details/wikipedia-search/" target="_blank">Opera add-ons site</a> if you can.'); | ||
} else if (useragent.includes("Chrome")) { | ||
$('.review-info').html('Also please leave a review on the <a href="https://chrome.google.com/webstore/detail/wikipedia-search/lipakennkogpodadpikgipnogamhklmk" target="_blank">Chrome Web Store</a> if you can.'); | ||
} | ||
|
||
}); | ||
// Opera has to be checked before Chrome, because Opera has both "Chrome" and "OPR" in the user agent string | ||
if (useragent.includes("OPR")) { | ||
document.querySelector('.review-info').innerHTML = 'Leaving a review on the <a href="https://addons.opera.com/en/extensions/details/wikipedia-search/" target="_blank">Opera add-ons site</a> is also greatly appreciated!' | ||
} else if (useragent.includes("Chrome")) { | ||
document.querySelector('.review-info').innerHTML = 'Leaving a review on the <a href="https://chrome.google.com/webstore/detail/wikipedia-search/lipakennkogpodadpikgipnogamhklmk" target="_blank">Chrome Web Store</a> is also greatly appreciated!' | ||
} |
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
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