Skip to content

Instantly share code, notes, and snippets.

@DungGramer
Last active March 17, 2023 12:16
Show Gist options
  • Save DungGramer/f385bac3af5d38ca789d71ceaa906ff0 to your computer and use it in GitHub Desktop.
Save DungGramer/f385bac3af5d38ca789d71ceaa906ff0 to your computer and use it in GitHub Desktop.
By-pass Ad SEO
// Minify
javascript:(()=>{const o=[`https://mneylink.com/load_traffic?r=${location.href}&w=${location.href}`,`https://traffic1s.com/get-codes?client_id=${t=(new Date).getTime(),window.performance&&"function"==typeof window.performance.now&&(t+=performance.now()),"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(o){var n=(t+16*Math.random())%16|0;return t=Math.floor(t/16),("x"==o?n:3&n|8).toString(16)}))}&pathname=/&href=${location.href}/&hostname=${location.hostname}`];var t;const n=[];function e(o,t){for(const n of t)if(o[n])return o[n];for(const n in o)if("object"==typeof o[n]){const x=e(o[n],t);if(x)return x}}Promise.all(o.map((o=>fetch(o).then((o=>o.json()))))).then((o=>{o.forEach((o=>{const t=e(o,["html","code"]);t&&n.push(t)})),alert(n)}))})();
// Full
(() =>{
const url = [`https://mneylink.com/load_traffic?r=${location.href}&w=${location.href}`, `https://traffic1s.com/get-codes?pathname=/&href=${location.href}/&hostname=${location.hostname}`];
const result = [];
function findDeepKey(obj, keys) {
for (const k of keys) {
if (obj[k]) {
return obj[k];
}
}
for (const k in obj) {
if (typeof obj[k] === 'object') {
const result = findDeepKey(obj[k], keys);
if (result) {
return result;
}
}
}
}
Promise.all(url.map(u => fetch(u).then(res => res.json()))).then(res => {
res.forEach(r => {
const code = findDeepKey(r, ['html', 'code']);
if (code) {
result.push(code);
}
});
alert(result);
});
})();
//Minify
// Full
(() => {
const url = `https://traffic1s.com/get-codes?pathname=/&href=${location.href}/&hostname=${location.hostname}`;
fetch(url).then(x => x.json()).then(x => alert(x?.html));
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment