Guest User

MES Paste: Archive.is Support for Brave Browser

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