diff --git a/README.md b/README.md index fc4b07d..d111134 100644 --- a/README.md +++ b/README.md @@ -1,27 +1,23 @@ -# Ads-Link-Skiper -Chrome Extension that skip ads on sites like adf.ly and prevent spam popups +# Ads Link Skiper +Ads Link Skiper is a Google Chrome Extension that skips link shorteners ads and prevent spam popups. +#### You can install this extension directly at the following web site: https://chrome.google.com/webstore/detail/ads-link-skiper/bkpeohkfimdfogdnpcnokjkbpankkmil -Suported sites: +## Suported link shorteners sites: +#### CROCO * croco.site -* sh.st -* clkmein.com -* viid.me -* xiw34.com -* destyy.com -* ceesty.com -* clkme.me -* cllkme.com -* corneey.com -* festyy.com -* gestyy.com -* jnw0.com -* qaafa.com -* wiid.me - +#### LINK SHRINK +* linkshrink.net + +#### SHINK ME +* shink.me +* shink.in +* fas.li + +#### ADF.LY * agileurbia.com * threadsphere.bid * zipteria.com @@ -58,8 +54,23 @@ Suported sites: * zo.ee * skamason.com -* linkshrink.net +#### SH.ST +* sh.st +* clkmein.com +* viid.me +* xiw34.com +* destyy.com +* ceesty.com +* clkme.me +* cllkme.com +* corneey.com +* festyy.com +* gestyy.com +* jnw0.com +* qaafa.com +* wiid.me +#### AUTOMATICALLY CLOSED SPAM SITES * gamezjet.com * fftrak.pro * translationbuddy.com @@ -108,8 +119,4 @@ Suported sites: * adexchangemachine.com * medianewpage.com * muzicplay.com -* newtabtv.com - -* shink.me -* shink.in -* fas.li +* newtabtv.com \ No newline at end of file diff --git a/src/js/background.js b/src/js/background.js index fd2aaea..9ebb9ab 100644 --- a/src/js/background.js +++ b/src/js/background.js @@ -7,57 +7,46 @@ Background script **/ - // Enabled sites variable switch -var enabled_sites = { +var enabledSites = { adfly: true, shinkme: true, shst: true, croco: true, linkshrink: true, - ouo: true, bluemediafiles: true, spam: true, - captcha: false, - cuon: false } /******************** Storage manager start */ -function save_sites() { +function saveSites() { chrome.storage.local.set({ - 'enabled_sites': enabled_sites + 'enabledSites': enabledSites }, function(result) { console.log("Updated data."); }); } -chrome.storage.local.get('enabled_sites', function(result) { +chrome.storage.local.get('enabledSites', function(result) { if (result == null) return; - enabled_sites = result.enabled_sites; + + enabledSites = result.enabledSites; console.log("Successful loaded data."); - if (enabled_sites == null || (enabled_sites != null && enabled_sites.adfly == null)) { - enabled_sites = { + // In case that stored sites was invalid, redefine sites map. + if (enabledSites == null || (enabledSites != null && enabledSites.adfly == null)) { + enabledSites = { adfly: true, shinkme: true, shst: true, croco: true, linkshrink: true, - ouo: true, bluemediafiles: true, spam: true, - captcha: false, - cuon: false } } - // Disable disabled functions - if ((enabled_sites != null && enabled_sites.captcha == null)) { - enabled_sites.captcha = false; - enabled_sites.cuon = false; - } - }); /******************** Storage manager end */ @@ -66,7 +55,7 @@ chrome.storage.local.get('enabled_sites', function(result) { /******************** Domain list start */ // sh.st domain list -var requestFilter_sh = { +var requestFilterSh = { urls: [ "*://*.sh.st/*", "*://*.clkmein.com/*", @@ -87,7 +76,7 @@ var requestFilter_sh = { }; // Spam/Popup's domain list -var requestFilter_spam = { +var requestFilterSpam = { urls: [ "*://*.higheurest.com/*", "*://*.adviewgroup.com/*", @@ -161,7 +150,7 @@ var requestFilter_spam = { }; // Adf.ly domains list -var requestFilter_adf = { +var requestFilterAdf = { urls: [ "*://*.larati.net/*", "*://*.xterca.net/*", @@ -220,7 +209,7 @@ var requestFilter_adf = { }; // shink.me domain list -var requestFilter_shinkme = { +var requestFilterShinkme = { urls: [ "*://*.shon.xyz/*", "*://*.fas.li/*", @@ -229,44 +218,22 @@ var requestFilter_shinkme = { ] }; -// ouo.io domain list -var requestFilter_ouo = { - urls: [ - "*://*.ouo.io/*", - "*://*.ouo.press/*" - ] -}; - -// cuon domain list -var requestFilter_cuon = { - urls: [ - "*://*.cuon.io/*" - ] -}; - -// tmearn domain list -var requestFilter_tmearn = { - urls: [ - "*://*.tmearn.com/*" - ] -}; - // croco domain list -var requestFilter_croco = { +var requestFilterCroco = { urls: [ "*://*.croco.site/*" ] }; // LinkShrink domain list -var requestFilter_linkshrink = { +var requestFilterLinkshrink = { urls: [ "*://*.linkshrink.net/*" ] }; // Bluemediafiles domain list. -var requestFilter_bluemefi = { +var requestFilterBluemefi = { urls: [ "*://*.bluemediafiles.com/*" ] @@ -279,47 +246,37 @@ var requestFilter_bluemefi = { /** Bluemediafiles sites **/ chrome.webRequest.onCompleted.addListener(function(details) { - if (!enabled_sites.bluemediafiles) return; + if (!enabledSites.bluemediafiles) return; chrome.tabs.executeScript(details.tabId, { file: "js/sites/BlueMediaFiles.js", runAt: "document_start" }); -}, requestFilter_bluemefi); +}, requestFilterBluemefi); /** Adf.ly sites **/ chrome.webRequest.onCompleted.addListener(function(details) { - if (!enabled_sites.adfly) return; + if (!enabledSites.adfly) return; chrome.tabs.executeScript(details.tabId, { file: "js/sites/adfly.js", runAt: "document_start" }); -}, requestFilter_adf); - - -/** Cuon.io sites **/ -chrome.webRequest.onCompleted.addListener(function(details) { - if (!enabled_sites.cuon) return; - chrome.tabs.executeScript(details.tabId, { - file: "js/sites/cuon.io.js", - runAt: "document_start" - }); -}, requestFilter_cuon); +}, requestFilterAdf); /** Croco.sites sites **/ chrome.webRequest.onCompleted.addListener(function(details) { - if (!enabled_sites.croco) return; + if (!enabledSites.croco) return; chrome.tabs.executeScript(details.tabId, { file: "js/sites/croco.js", runAt: "document_start" }); -}, requestFilter_croco); +}, requestFilterCroco); /** ShinkMe sites **/ chrome.webRequest.onCompleted.addListener(function(details) { - if (!enabled_sites.shinkme) return; + if (!enabledSites.shinkme) return; if (details.type == "main_frame" && details.url.indexOf("shink.in") != -1) chrome.tabs.update(details.tabId, { url: details.url.replace("shink.in", "shink.me") }); @@ -327,100 +284,21 @@ chrome.webRequest.onCompleted.addListener(function(details) { file: "js/sites/shinkme.js", runAt: "document_start" }); -}, requestFilter_shinkme); - -/** ouo.io sites **/ - -/* CURRENT DISABLED -chrome.webRequest.onCompleted.addListener(function(details) { - if (!enabled_sites.ouo || details.url.split("/")[3] == "rgo" && details.type != "main_frame") return; - chrome.tabs.executeScript(details.tabId, { - file: "js/sites/ouo.js", - runAt: "document_start" - }); -}, requestFilter_ouo); - - -chrome.webRequest.onBeforeSendHeaders.addListener(function(details) { - if (!enabled_sites.ouo || details.url.split("/")[3] != "go" || details.url.split("/").lenght == 5) return; - var newRef = "http://ouo.io/" + details.url.split("/")[4]; - var gotRef = false; - for (var n in details.requestHeaders) { - gotRef = details.requestHeaders[n].name.toLowerCase() == "referer"; - if (gotRef) break; - } - if (!gotRef) chrome.tabs.update(details.tabId, { - "url": newRef - }); - console.log("Unbugged ouo: " + newRef); - return { - requestHeaders: details.requestHeaders - }; -}, requestFilter_ouo, ['requestHeaders', 'blocking']); - - -chrome.webRequest.onHeadersReceived.addListener(function (details) { - if(details.type != "main_frame") return; - for (var n in details.responseHeaders) { - if(details.responseHeaders[n].name.toLowerCase() != "location") continue; - let location = details.responseHeaders[n].value; - console.log(details.initiator + "," + location); - } - console.log(details); -},requestFilter_ouo,["blocking", "responseHeaders"]); - -*/ - -chrome.webRequest.onCompleted.addListener(function(details) { - if(details.type != "main_frame") return; - console.log(details); -},requestFilter_ouo, ['responseHeaders']); - -/* - -chrome.webRequest.onBeforeSendHeaders.addListener(function(details) { - //if (!enabled_sites.ouo || details.url.split("/")[3] != "go" || details.url.split("/").lenght == 5) return; - /* - var newRef = "http://ouo.io/" + details.url.split("/")[4]; - var gotRef = false; - for (var n in details.requestHeaders) { - gotRef = details.requestHeaders[n].name.toLowerCase() == "referer"; - if (gotRef) break; - } - if (!gotRef) chrome.tabs.update(details.tabId, { - "url": newRef - }); - console.log("Unbugged ouo: " + newRef); - return { - requestHeaders: details.requestHeaders - }; - - - console.log(details); - -}, requestFilter_ouo, ['requestHeaders', 'blocking']); -*/ +}, requestFilterShinkme); /** LinkShrink sites **/ chrome.webRequest.onCompleted.addListener(function(details) { - if (!enabled_sites.linkshrink) return; + if (!enabledSites.linkshrink) return; chrome.tabs.executeScript(details.tabId, { file: "js/sites/linkshrink.js", runAt: "document_start" }); -}, requestFilter_linkshrink); - - -/** SpamShit sites **/ -chrome.webRequest.onCompleted.addListener(function(details) { - if (!enabled_sites.spam) return; - if (details.type == "main_frame") chrome.tabs.remove(details.tabId); -}, requestFilter_spam); +}, requestFilterLinkshrink); /** Sh.sh sites **/ chrome.webRequest.onBeforeSendHeaders.addListener(function(details) { - if (!enabled_sites.shst) return; + if (!enabledSites.shst) return; var headers = details.requestHeaders; headers = headers.filter(function(x) { return x.name !== 'User-Agent'; @@ -428,6 +306,13 @@ chrome.webRequest.onBeforeSendHeaders.addListener(function(details) { return { requestHeaders: headers }; -}, requestFilter_sh, ['requestHeaders', 'blocking']); +}, requestFilterSh, ['requestHeaders', 'blocking']); + + +/** SpamShit sites **/ +chrome.webRequest.onCompleted.addListener(function(details) { + if (!enabledSites.spam) return; + if (details.type == "main_frame") chrome.tabs.remove(details.tabId); +}, requestFilterSpam); -/******************** Sites script's end */ +/******************** Sites script's end */ \ No newline at end of file diff --git a/src/js/remember/info.txt b/src/js/remember/info.txt deleted file mode 100644 index 786240a..0000000 --- a/src/js/remember/info.txt +++ /dev/null @@ -1,2 +0,0 @@ -Almacenar en una base de datos remota el resultado de los links acortadores, de esta forma aunque cambien los algoritmos el resultado seguira almacenado. -Cuando un usuario acceda a un link no almacenado este lo enviara para almacenarlo. diff --git a/src/js/sites/adfly.js b/src/js/sites/adfly.js index df75daf..eb9ba00 100644 --- a/src/js/sites/adfly.js +++ b/src/js/sites/adfly.js @@ -8,68 +8,68 @@ Script for adf.ly **/ // Thankyou to https://github.com/StoreClerk/AdF.ly-Skipper/blob/master/AdF.ly%20Skipper/js/script.js -// Tankyou to tote.ervin (PD: Add me to your code too!) +// Thank you to tote.ervin (PD: Add me to your code too!) // Event runners document.addEventListener('DOMNodeRemoved', skip, false); -document.addEventListener('DOMContentLoaded', function(){ - document.removeEventListener('DOMNodeRemoved', skip, false); +document.addEventListener('DOMContentLoaded', function() { + document.removeEventListener('DOMNodeRemoved', skip, false); }); /** Skip adf.ly function */ -function skip(){ - var ysmm = /ysmm = \'(.*?)\';/gi; - var code = ysmm.exec(document.getElementsByTagName('html')[0].innerHTML); - if(code == null)return; - code = code[1]; - var codeLeft = '', codeRight = ''; - for (var i = 0; i < code.length; i++) { - if (i % 2 == 0) codeLeft += code.charAt(i); - else codeRight = code.charAt(i) + codeRight; - } +function skip() { + var ysmm = /ysmm = \'(.*?)\';/gi; + var code = ysmm.exec(document.getElementsByTagName('html')[0].innerHTML); + if (code == null) return; + code = code[1]; + var codeLeft = '', + codeRight = ''; + for (var i = 0; i < code.length; i++) { + if (i % 2 == 0) codeLeft += code.charAt(i); + else codeRight = code.charAt(i) + codeRight; + } - code = (codeLeft + codeRight).split(''); - for (var i = 0; i < code.length; i++) { - if (isNaN(code[i]))continue; - for (var j = i + 1; j < code.length; j++) { - if (isNaN(code[j])) continue; - if ((code[i]^code[j]) < 10) code[i] = code[i]^code[j]; - i = j; - j = code.length; - } - } + code = (codeLeft + codeRight).split(''); + for (var i = 0; i < code.length; i++) { + if (isNaN(code[i])) continue; + for (var j = i + 1; j < code.length; j++) { + if (isNaN(code[j])) continue; + if ((code[i] ^ code[j]) < 10) code[i] = code[i] ^ code[j]; + i = j; + j = code.length; + } + } - url = code.join(''); - url = window.atob(url); - url = url.substring(16, url.length - 16); - window.location = url; + url = code.join(''); + url = window.atob(url); + url = url.substring(16, url.length - 16); + window.location = url; } /** Adblock Warning banner */ setTimeout(verifyLock, 500); + function verifyLock() { - var time = setTimeout(verifyLock, 500); - var elementclick = xp('//*[@id="continue"]/div/a'); - if (elementclick != null && elementclick.href.length > 0) { + var time = setTimeout(verifyLock, 500); + var elementclick = xp('//*[@id="continue"]/div/a'); + if (!(elementclick != null && elementclick.href.length > 0)) return; - var html = '
Ads link skiper is trying to bypass this site... If you found any error please report it to personal@xxnurioxx.me Hide this
'; - var div = document.createElement('div'); - div.innerHTML = html; - document.body.appendChild(div); + var html = '
Ads link skiper is trying to bypass this site... If you found any error please report it to personal@xxnurioxx.me Hide this
'; + var div = document.createElement('div'); + div.innerHTML = html; + document.body.appendChild(div); - window.location.replace(elementclick.href); - return; - } + window.location.replace(elementclick.href); } // I rlly don't know what is this. By the way i let it here by now xD if (document instanceof HTMLDocument) { - var script = document.createElement('script'); - script.textContent = code; - document.documentElement.appendChild(script); + var script = document.createElement('script'); + script.textContent = code; + document.documentElement.appendChild(script); } /** xPath function */ function xp(query) { - return document.evaluate(query, document, null, XPathResult.FIRST_ORDERED_NODE_TYPE, null).singleNodeValue + return document.evaluate(query, document, null, XPathResult.FIRST_ORDERED_NODE_TYPE, null).singleNodeValue } \ No newline at end of file diff --git a/src/js/sites/cuon.io.js b/src/js/sites/cuon.io.js deleted file mode 100644 index d698043..0000000 --- a/src/js/sites/cuon.io.js +++ /dev/null @@ -1,32 +0,0 @@ -/** - -[Ads link skiper] by xXNurioXx -https://chrome.google.com/webstore/detail/ads-link-skiper/bkpeohkfimdfogdnpcnokjkbpankkmil - -Script for cuon.io - -**/ - -window.addEventListener("load", () => { - - let captchaInterval = setInterval(() => { - var btn = xp('//*[@id="invisibleCaptchaShortlink"]'); - if(btn != null && !btn.disabled){ - console.log("OK!!"); - xp('//*[@id="link-view"]').submit(); - } - - var btn2 = xp('//a[text()="Get Link"]'); - if(btn2 != null && !btn2.disabled && btn2.getAttribute('data-href') != null){ - console.log("OK!!"); - window.location.href = btn2.getAttribute('data-href'); - } - - }, 500); - -}); - -/** xPath function */ -function xp(query) { - return document.evaluate(query, document, null, XPathResult.FIRST_ORDERED_NODE_TYPE, null).singleNodeValue -} \ No newline at end of file diff --git a/src/js/sites/linkbucks.js b/src/js/sites/linkbucks.js deleted file mode 100644 index 66c2a4e..0000000 --- a/src/js/sites/linkbucks.js +++ /dev/null @@ -1,5 +0,0 @@ -/* - -Not working. - -*/ \ No newline at end of file diff --git a/src/js/sites/linkshrink.js b/src/js/sites/linkshrink.js index 7a6c802..3963eb0 100644 --- a/src/js/sites/linkshrink.js +++ b/src/js/sites/linkshrink.js @@ -12,14 +12,14 @@ setTimeout(skip, 100); var html = '

This site can be damaged by extension Ads link skiper. If you found any error please report it to personal@xxnurioxx.me

REMEMBER DISABLE OTHERS AD BLOCKERS AT THIS SITE.

Hide this
'; var div = document.createElement('div'); div.innerHTML = html; -window.onload = function(){document.body.appendChild(div);} +window.onload = function() { document.body.appendChild(div); } function skip() { var time = setTimeout(skip, 100); - for(var a=1; a 0) { window.location.replace(url); @@ -27,7 +27,7 @@ function skip() { return; } } - + } /** xPath length funciton */ @@ -37,7 +37,7 @@ function xpL(query) { /** xPath function */ function xp(query) { - return document.evaluate(query, document, null, XPathResult.FIRST_ORDERED_NODE_TYPE, null).singleNodeValue + return document.evaluate(query, document, null, XPathResult.FIRST_ORDERED_NODE_TYPE, null).singleNodeValue } /* Decrypt the url result function */ @@ -133,4 +133,4 @@ function revC(ine) { } }; return 'http://linkshrink.net/' + b64.decode(ine); -} +} \ No newline at end of file diff --git a/src/js/sites/shinkme.js b/src/js/sites/shinkme.js index e568c56..4b4d28a 100644 --- a/src/js/sites/shinkme.js +++ b/src/js/sites/shinkme.js @@ -10,70 +10,73 @@ Script for shink.me setTimeout(submit, 100); var html = '
This site need 3 captcha solves after Ads link skiper can do skip :) If you found any error please report it to personal@xxnurioxx.me Hide this
'; -if(document.URL.split("/")[2] == "fas.li"){ - var html = '
This site need captcha solve after Ads link skiper can do skip :) If you found any error please report it to personal@xxnurioxx.me Hide this
'; + +if (document.URL.split("/")[2] == "fas.li") { + var html = '
This site need captcha solve after Ads link skiper can do skip :) If you found any error please report it to personal@xxnurioxx.me Hide this
'; } + var div = document.createElement('div'); div.innerHTML = html; -window.onload = function(){ - if(xp('//*[@id="url"]') == null)document.body.appendChild(div); -} +window.addEventListener("load", function() { + if (xp('//*[@id="url"]') == null) document.body.appendChild(div); +}); var submited = false; -function submit(){ - - var error1 = xp('//*[@id="container"]/h1'); - var error2 = xp('/html/body'); - if( (error1 != null && error1.innerHTML == "An Error Was Encountered") || (error2 != null && error2.innerHTML == "Error in exception handler.") ){ - var url = document.URL.split('/')[3]; - if(url == "redirect") url = document.URL.split('/')[5]; - window.location.href = "http://shink.me/"+url; - return; - } - - if(!submited) setTimeout(submit, 100); - var center = xp('//*[@class="center-captcha"]'); - var captcha = xp('//*[@id="skip"]/script'); - var formto = xp('//*[@id="skip"]'); - - - var skipbtn = xp('//*[@id="btn-main"]'); - if(skipbtn != null){ - if(skipbtn.href != null && skipbtn.href != "undefined" && skipbtn.href != "Undefined" && skipbtn.href != ""){ - window.location.replace(skipbtn.href); - submited = true; - return; - } - } - - if(skipbtn != null && (skipbtn.href == null || skipbtn.href == "")){ - skipbtn.disabled = false; - skipbtn.click(); - submited = true; - return; - } - - - if(formto != null && captcha == null){ - formto.submit(); - submited = true; - return; - }else if(xp('//*[@id="url"]') == null){ - setTimeout(function(){ - var ad = xp('//*[@id="captcha"]/div/div/div'); - if(ad != null) ad.remove(); - ad = xp('//*[@id="page-top"]/div[2]/div/div/div/div[1]/a'); - if(ad != null) ad.remove(); - ad = xp('//*[@id="page-top"]/div[2]/div/div/div/div[2]'); - if(ad != null) ad.remove(); - ad = xp('//*[@id="page-top"]/div[1]/div[1]/div/div/div/div[1]/iframe'); - if(ad != null) ad.remove(); - ad = xp('//*[@id="page-top"]/iframe'); - if(ad != null) ad.remove(); - ad = xp('//a[@target="_blank"]'); - if(ad != null) ad.remove(); - }, 10); - } + +function submit() { + + var error1 = xp('//*[@id="container"]/h1'); + var error2 = xp('/html/body'); + + if ((error1 != null && error1.innerHTML == "An Error Was Encountered") || (error2 != null && error2.innerHTML == "Error in exception handler.")) { + var url = document.URL.split('/')[3]; + if (url == "redirect") url = document.URL.split('/')[5]; + window.location.href = "http://shink.me/" + url; + return; + } + + if (!submited) setTimeout(submit, 100); + var center = xp('//*[@class="center-captcha"]'); + var captcha = xp('//*[@id="skip"]/script'); + var formto = xp('//*[@id="skip"]'); + + var skipbtn = xp('//*[@id="btn-main"]'); + if (skipbtn != null) { + if (skipbtn.href != null && skipbtn.href != "undefined" && skipbtn.href != "Undefined" && skipbtn.href != "") { + window.location.replace(skipbtn.href); + submited = true; + return; + } + } + + if (skipbtn != null && (skipbtn.href == null || skipbtn.href == "")) { + skipbtn.disabled = false; + skipbtn.click(); + submited = true; + return; + } + + if (formto != null && captcha == null) { + formto.submit(); + submited = true; + return; + } else if (xp('//*[@id="url"]') == null) { + setTimeout(function() { + var ad = xp('//*[@id="captcha"]/div/div/div'); + if (ad != null) ad.remove(); + ad = xp('//*[@id="page-top"]/div[2]/div/div/div/div[1]/a'); + if (ad != null) ad.remove(); + ad = xp('//*[@id="page-top"]/div[2]/div/div/div/div[2]'); + if (ad != null) ad.remove(); + ad = xp('//*[@id="page-top"]/div[1]/div[1]/div/div/div/div[1]/iframe'); + if (ad != null) ad.remove(); + ad = xp('//*[@id="page-top"]/iframe'); + if (ad != null) ad.remove(); + ad = xp('//a[@target="_blank"]'); + if (ad != null) ad.remove(); + }, 10); + } + } /* xPath function */ diff --git a/src/manifest.json b/src/manifest.json index 32f1bb1..7699de1 100644 --- a/src/manifest.json +++ b/src/manifest.json @@ -1,10 +1,10 @@ { "name": "Ads Link Skipper", - "version": "1.6.3", + "version": "1.7.1", "description": "Skip ads on sites like adf.ly and prevent spam popups", - "author": [ { + "author": [{ "name": "xXNurioXx", - "email": "xxnurioxx@gmail.com" + "email": "personal@nurio.me" }], "permissions": [ "tabs", @@ -19,10 +19,6 @@ "*://*.ouo.io/*", "*://*.ouo.press/*", - "*://*.cuon.io/*", - - "*://*.tmearn.com/*", - "*://*.sh.st/*", "*://*.clkmein.com/*", "*://*.viid.me/*", @@ -37,7 +33,7 @@ "*://*.jnw0.com/*", "*://*.qaafa.com/*", "*://*.wiid.me/*", - + "*://*.larati.net/*", "*://*.xterca.net/*", "*://*.evassmat.com/*", @@ -167,9 +163,6 @@ "*://*.shon.xyz/*", "*://*.fas.li/*", - "*://*.jzrputtbut.net/*", - "*://*.linkbucks.com/*", - "*://*.bluemediafiles.com/*" ], diff --git a/src/popup/font/Montserrat-Regular.woff2 b/src/popup/font/Montserrat-Regular.woff2 new file mode 100644 index 0000000..70788c2 Binary files /dev/null and b/src/popup/font/Montserrat-Regular.woff2 differ diff --git a/src/popup/popup.html b/src/popup/popup.html index 3b45ad7..4524dd9 100644 --- a/src/popup/popup.html +++ b/src/popup/popup.html @@ -1,106 +1,121 @@ + - - + + - - + + + - - - - - - -

Ads Link Skiper

- - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
StatusSite (Groups)
- - Adf.ly (+55 Sites)
- - Sh.st (+14 Sites)
- - ShinkMe (+2 Sites)
- - Croco
- - LinkShrink
- - BlueMediaFiles
- - Popups Sites [Auto-Close] (+57 Sites)
- - Ouo.io (Current disabled)
- - + +
+
+ +
+

Ads Link Skiper

+
+
+
+
+

Power by nurio.me

+
+ +
+
+ +
+
+
Status
+
Site's group name
+
+ +
+ + +
+
+ +
+
ADF.LY
+
+ + +
+
+ +
+
SH.ST
+
+ + +
+
+ +
+
CROCO
+
+ + +
+
+ +
+
SHINK ME
+
+ + +
+
+ +
+
LINK SHRINK
+
+ + +
+
+ +
+
BLUE MEDIA FILES
+
+ +
+ +
+ +
+
+
+ +
+
Automatically close spam popups
+
+
+ - + + \ No newline at end of file diff --git a/src/popup/popup.js b/src/popup/popup.js index 0d73d1b..3b82362 100644 --- a/src/popup/popup.js +++ b/src/popup/popup.js @@ -1,39 +1,54 @@ -window.onload = function(){ +window.addEventListener("load", function() { var adfly = document.getElementById("adfly"); - adfly.onclick = function(){chrome.extension.getBackgroundPage().enabled_sites.adfly = adfly.checked; chrome.extension.getBackgroundPage().save_sites();} - - var ouo = document.getElementById("ouo"); - ouo.onclick = function(){chrome.extension.getBackgroundPage().enabled_sites.ouo = ouo.checked; chrome.extension.getBackgroundPage().save_sites();} - + adfly.addEventListener("click", function() { + chrome.extension.getBackgroundPage().enabledSites.adfly = adfly.checked; + chrome.extension.getBackgroundPage().saveSites(); + }); + var shst = document.getElementById("shst"); - shst.onclick = function(){chrome.extension.getBackgroundPage().enabled_sites.shst = shst.checked; chrome.extension.getBackgroundPage().save_sites();} - + shst.addEventListener("click", function() { + chrome.extension.getBackgroundPage().enabledSites.shst = shst.checked; + chrome.extension.getBackgroundPage().saveSites(); + }); + var shinkme = document.getElementById("shinkme"); - shinkme.onclick = function(){chrome.extension.getBackgroundPage().enabled_sites.shinkme = shinkme.checked; chrome.extension.getBackgroundPage().save_sites();} - + shinkme.addEventListener("click", function() { + chrome.extension.getBackgroundPage().enabledSites.shinkme = shinkme.checked; + chrome.extension.getBackgroundPage().saveSites(); + }); + var croco = document.getElementById("croco"); - croco.onclick = function(){chrome.extension.getBackgroundPage().enabled_sites.croco = croco.checked; chrome.extension.getBackgroundPage().save_sites();} - + croco.addEventListener("click", function() { + chrome.extension.getBackgroundPage().enabledSites.croco = croco.checked; + chrome.extension.getBackgroundPage().saveSites(); + }); + var linkshrink = document.getElementById("linkshrink"); - linkshrink.onclick = function(){chrome.extension.getBackgroundPage().enabled_sites.linkshrink = linkshrink.checked; chrome.extension.getBackgroundPage().save_sites();} - - var bluemediafiles = document.getElementById("bluemediafiles"); - bluemediafiles.onclick = function(){chrome.extension.getBackgroundPage().enabled_sites.bluemediafiles = bluemediafiles.checked; chrome.extension.getBackgroundPage().save_sites();} - - var spam = document.getElementById("spam"); - spam.onclick = function(){chrome.extension.getBackgroundPage().enabled_sites.spam = spam.checked; chrome.extension.getBackgroundPage().save_sites();} + linkshrink.addEventListener("click", function() { + chrome.extension.getBackgroundPage().enabledSites.linkshrink = linkshrink.checked; + chrome.extension.getBackgroundPage().saveSites(); + }); - adfly.checked = chrome.extension.getBackgroundPage().enabled_sites.adfly; - shst.checked = chrome.extension.getBackgroundPage().enabled_sites.shst; - shinkme.checked = chrome.extension.getBackgroundPage().enabled_sites.shinkme; - croco.checked = chrome.extension.getBackgroundPage().enabled_sites.croco; - linkshrink.checked = chrome.extension.getBackgroundPage().enabled_sites.linkshrink; - bluemediafiles.checked = chrome.extension.getBackgroundPage().enabled_sites.bluemediafiles; - spam.checked = chrome.extension.getBackgroundPage().enabled_sites.spam; + var bluemediafiles = document.getElementById("bluemediafiles"); + bluemediafiles.addEventListener("click", function() { + chrome.extension.getBackgroundPage().enabledSites.bluemediafiles = bluemediafiles.checked; + chrome.extension.getBackgroundPage().saveSites(); + }); - //ouo.checked = chrome.extension.getBackgroundPage().enabled_sites.ouo; - ouo.checked = true; + var spam = document.getElementById("spam"); + spam.addEventListener("click", function() { + chrome.extension.getBackgroundPage().enabledSites.spam = spam.checked; + chrome.extension.getBackgroundPage().saveSites(); + }); -} + // Load current status of sites. + adfly.checked = chrome.extension.getBackgroundPage().enabledSites.adfly; + shst.checked = chrome.extension.getBackgroundPage().enabledSites.shst; + shinkme.checked = chrome.extension.getBackgroundPage().enabledSites.shinkme; + croco.checked = chrome.extension.getBackgroundPage().enabledSites.croco; + linkshrink.checked = chrome.extension.getBackgroundPage().enabledSites.linkshrink; + bluemediafiles.checked = chrome.extension.getBackgroundPage().enabledSites.bluemediafiles; + spam.checked = chrome.extension.getBackgroundPage().enabledSites.spam; +}); \ No newline at end of file diff --git a/src/popup/style.css b/src/popup/style.css index 841642e..f7fc54c 100644 --- a/src/popup/style.css +++ b/src/popup/style.css @@ -1,143 +1,168 @@ -@import url('https://fonts.googleapis.com/css?family=Josefin+Sans'); +/* Load Montserrat font */ + +@font-face { + font-family : 'Montserrat'; + font-style : normal; + font-weight : 400; + font-display : swap; + src : local('Montserrat Regular'), local('Montserrat-Regular'), url('font/Montserrat-Regular.woff2') format('woff2'); + unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; +} + +/* Style start */ .outer { - display: table; + display : table; position: absolute; - height: 100%; - width: 100%; + height : 100%; + width : 100%; } .middle { - display: table-cell; + display : table-cell; vertical-align: middle; } .inner { - margin-left: auto; - margin-right: auto; - width: 132px; + margin-left : auto; + margin-right: auto; + width : 132px; } .logo { - width: 75px; - height: 75px; + width : 70px; + height: 70px; } -table.table-head { - background-color: #f5f5f5; -} -table.table-head > tbody > tr > td{ - padding-left: 11px; - padding-right: 11px; - padding-top: 4px; - padding-bottom: 4px; +.top-bar { + background-color : #f5f5f5; + padding : 5px 15px; + display : grid; + grid-template-rows: auto; + grid-gap : 0px; + border-bottom : 1px solid #dadada; + box-shadow : 0px -1px 5px 0px rgb(136, 136, 136); } -table.table-donate { - border-bottom: 2px solid #333; - background-color: #f5f5f5; +.bar-brand { + display : grid; + grid-template-columns: 75px 210px; + grid-gap : 10px; } -table.table-donate > tbody > tr > td:nth-child(1){ - padding-left: 20px; - padding-bottom: 5px; - width: 250px; -} -table.table-donate > tbody > tr > td:nth-child(2){ - padding-right: 20px; - padding-bottom: 5px; - width: 71px; +.bar-credits { + display : grid; + grid-template-columns: 215px 70px; + grid-gap : 10px; } -table.table-active-sites{ - margin: 15px; - background-color: #f5f5f5; - width: 295px; -} -table.table-active-sites > tbody > tr{ - height: 30px; - border-bottom: 1px solid rgba(51, 51, 51, 0.23); -} -table.table-active-sites > tbody > tr > td:nth-child(2){ - width: 220px; - padding-left: 10px; -} -table.table-active-sites > tbody > tr > td:nth-child(1){ - width: 60px; - text-align: center; +.btn-donate { + margin-top: 4px; } -h1{ - font-size: 29px; - font-family: 'Josefin Sans', sans-serif; +.section-grid { + background-color : #f5f5f5; + box-shadow : 1px 1px 3px -1px rgb(136, 136, 136); + border-radius : 3px; + margin : 15px; + padding : 10px; + display : grid; + grid-template-rows: auto; } -h4{ - font-size: 20px; - font-family: 'Josefin Sans', sans-serif; +.section-row { + display : grid; + grid-template-columns: 40px 165px; + grid-gap : 30px; + padding : 4px 0px; + border-top : 1px solid #e0e0e0; } +.features-row { + display : grid; + grid-template-columns: 40px 210px; + grid-gap : 20px; + padding : 4px 0px; + border-top : 1px solid #e0e0e0; +} +.no-upperline { + border-top: none; +} +h1 { + font-size : 27px; + font-family: 'Montserrat', sans-serif; +} +h4 { + font-size : 20px; + font-family: 'Montserrat', sans-serif; +} +a:hover { + text-decoration: none; +} +.text-upper { + text-transform: uppercase; +} - - - - - - - +/* Enable - disable swtich */ .switch { - position: relative; - display: inline-block; - width: 35px; - height: 19px; - margin-bottom:0; + position: relative; + display : inline-block; + width : 100%; + height : 19px; + margin : 0px 6px; } -.switch input {display:none;} +.switch input { + display: none; +} .slider { - position: absolute; - cursor: pointer; - top: 0; - left: 0; - right: 0; - bottom: 0; - background-color: #cd4244; - -webkit-transition: .4s; - transition: .4s; - border-radius: 17px; + position : absolute; + cursor : pointer; + top : 0; + left : 0; + right : 0; + bottom : 0; + background-color : #cd4244; + -webkit-transition: .4s; + transition : .4s; + border-radius : 17px; } .slider:before { - position: absolute; - content: ""; - height: 12px; - width: 12px; - left: 4px; - bottom: 4px; - background-color: white; - -webkit-transition: .4s; - transition: .4s; - border-radius: 50%; + position : absolute; + content : ""; + height : 12px; + width : 12px; + left : 6px; + bottom : 4px; + background-color : white; + -webkit-transition: .4s; + transition : .4s; + border-radius : 50%; } -input:checked + .slider { - background-color: #5cd14f; +input:checked+.slider { + background-color: #5cd14f; } -input:checked:disabled + .slider { +input:checked:disabled+.slider { background-color: #dad200; } -input:checked + .slider:before { - -webkit-transform: translateX(15px); - -ms-transform: translateX(15px); - transform: translateX(15px); +input:checked+.slider:before { + -webkit-transform: translateX(15px); + -ms-transform : translateX(15px); + transform : translateX(15px); } +/* Uggly fixes */ +.ml6p { + margin-left: 6px; +} \ No newline at end of file