mirror of
https://gitlab.com/KevinRoebert/ClearUrls
synced 2025-12-16 14:15:36 +07:00
@@ -33,14 +33,12 @@ var lastVisited = "";
|
|||||||
|
|
||||||
function start()
|
function start()
|
||||||
{
|
{
|
||||||
changeIcon();
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Save OS Version
|
* Save OS Version
|
||||||
*/
|
*/
|
||||||
browser.runtime.getPlatformInfo(function(info) {
|
browser.runtime.getPlatformInfo(function(info) {
|
||||||
|
|
||||||
os = info.os;
|
os = info.os;
|
||||||
|
changeIcon();
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -55,6 +55,10 @@ function reload()
|
|||||||
*/
|
*/
|
||||||
function checkOSAndroid()
|
function checkOSAndroid()
|
||||||
{
|
{
|
||||||
|
browser.runtime.getPlatformInfo().then(function(info) {
|
||||||
|
os = info.os;
|
||||||
|
});
|
||||||
|
|
||||||
if(os == "android")
|
if(os == "android")
|
||||||
{
|
{
|
||||||
return true;
|
return true;
|
||||||
@@ -158,12 +162,14 @@ function increaseURLCounter()
|
|||||||
*/
|
*/
|
||||||
function changeIcon()
|
function changeIcon()
|
||||||
{
|
{
|
||||||
|
if(!checkOSAndroid()) {
|
||||||
if(storage.globalStatus){
|
if(storage.globalStatus){
|
||||||
browser.browserAction.setIcon({path: "img/clearurls.svg"});
|
browser.browserAction.setIcon({path: "img/clearurls.svg"});
|
||||||
} else{
|
} else{
|
||||||
browser.browserAction.setIcon({path: "img/clearurls_gray.svg"});
|
browser.browserAction.setIcon({path: "img/clearurls_gray.svg"});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the badged status from the browser storage and put the value
|
* Get the badged status from the browser storage and put the value
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"manifest_version": 2,
|
"manifest_version": 2,
|
||||||
"name": "ClearURLs",
|
"name": "ClearURLs",
|
||||||
"version": "1.5.1a",
|
"version": "1.5.1.5a",
|
||||||
"author": "Kevin R.",
|
"author": "Kevin R.",
|
||||||
"description": "Remove tracking elements form URLs.",
|
"description": "Remove tracking elements form URLs.",
|
||||||
"homepage_url": "https://gitlab.com/KevinRoebert/ClearUrls",
|
"homepage_url": "https://gitlab.com/KevinRoebert/ClearUrls",
|
||||||
|
|||||||
Reference in New Issue
Block a user