Guest User

Untitled

a guest
Aug 11th, 2020
441
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. // ==UserScript==
  2. // @name        Unblock Brave from archive.is
  3. // @namespace   Violentmonkey Scripts
  4. // @match       https://archive.is/*
  5. // @grant       none
  6. // @version     1.0
  7. // @author      -
  8. // @description 8/11/2020, 6:55:34 PM
  9. // @run-at      document-start
  10. // ==/UserScript==
  11. (function() {
  12.     "use strict";
  13.  
  14.     const inject = function() {
  15.         "use strict";
  16.  
  17.         function delete_cookie(name) {
  18.             document.cookie = name + '=; expires=Thu, 01 Jan 1970 00:00:01 GMT;';
  19.         }
  20.         delete_cookie('unsupported-browser');
  21.  
  22.         Object.defineProperty(window.navigator, "brave", {
  23.             get: function() {
  24.                 console.log("ok bro");
  25.                 return undefined;
  26.             }
  27.         });
  28.  
  29.     }
  30.  
  31.  
  32.     const script = document.createElement("script");
  33.     const target = document.head || document.documentElement;
  34.     script.text = "(" + inject.toString() + ")();";
  35.  
  36.     target.appendChild(script);
  37.     target.removeChild(script);
  38. })();
Add Comment
Please, Sign In to add comment