Skip to content

Instantly share code, notes, and snippets.

@Adam-S-Amir
Last active May 1, 2023 16:43
Show Gist options
  • Save Adam-S-Amir/3bafa06c35c9f87da49e31b2f16b4d38 to your computer and use it in GitHub Desktop.
Save Adam-S-Amir/3bafa06c35c9f87da49e31b2f16b4d38 to your computer and use it in GitHub Desktop.
Cookie remover for brainly.com

Get unlimted answers on Brainly.com with this quick add-on.

Download the chrome extension Tamper Monkey.

Click the icon.

Click create a new script...

Replace everything in the editor with:



// ==UserScript==

// u/name Cookies

// u/namespace Violentmonkey Scripts

// u/include https://brainly.com/*

// u/grant none

// u/version 1.0

// u/author -

// u/description 1/22/2023, 9:43:30 AM

// ==/UserScript==

setInterval(trash(), 1000);

function trash(){

(function() {

let website = "<br><a style='color:white;' href='https://adamtrex.azurewebsites.net/index.html'>https://adamtrex.azurewebsites.net/index.html</a>";

C = document.cookie.split("; ");

for (d = "." + location.host; d; d = ("" + d)

.substr(1)

.match(/..*$/))

for (sl = 0; sl < 2; ++sl)

for (p = "/" + location.pathname; p; p = p.substring(0, p.lastIndexOf('/')))

for (i in C)

if (c = C[i]) {

document.cookie = c + "; domain=" + d.slice(sl) + "; path=" + p.slice(1) + "/" + "; expires=" + new Date((new Date)

.getTime() - 1e11)

.toGMTString()

}

const msg = C.length + " cookies gone! Please support by visiting<br>(click the link)" + website;

showMessage(msg, 3000);

window.localStorage.clear();

sessionStorage.clear();

})();

function showMessage(msg, duration) {

var el = document.createElement("div");

el.setAttribute("style", "position:fixed;top:40%;left:40%;z-index:99;padding:4px;font-family: Arial, sans-serif;font-size:18px;color:white;background-color:black; opacity:0.7;");

el.innerHTML = msg;

setTimeout(function() {

el.parentNode.removeChild(el);

}, duration);

document.body.appendChild(el);

};

};

Enjoy!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment