🏠 Home 

Du skal logge ind eller oprette en konto for at kunne fortsætte.

Papergames Ban Bypass

Simple userscript to clear local storage, session storage, and cookies for unban purposes.

  1. // ==UserScript==
  2. // @name Papergames Ban Bypass
  3. // @namespace github.com/longkidkoolstar
  4. // @version 2.1
  5. // @description Simple userscript to clear local storage, session storage, and cookies for unban purposes.
  6. // @author longkidkoolstar
  7. // @icon https://i.imgur.com/nxEJksd.png
  8. // @match https://papergames.io/*
  9. // @grant GM_registerMenuCommand
  10. // @grant none
  11. // @license MIT
  12. // ==/UserScript==
  13. (function() {
  14. 'use strict';
  15. // Helper function to delete a cookie by name, path, and domain
  16. // Function to delete cookies for a specific domain
  17. function deleteCookie(name, domain) {
  18. const paths = ['/', '/path/', '/cookiepath/', '/morepath/', '/allpaths/']; // Add more paths or wildcard
  19. if (domain) {
  20. // Delete cookie for specific domain
  21. paths.forEach(path => {
  22. document.cookie = `${name}=; expires=Thu, 01 Jan 1970 00:00:00 UTC; domain=${domain}; path=${path}`;
  23. });
  24. } else {
  25. // Delete cookie for current domain
  26. paths.forEach(path => {
  27. document.cookie = `${name}=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=${path}`;
  28. });
  29. }
  30. }
  31. // Function to clear cookies for a specific domain
  32. function clearCookiesForDomain(domain) {
  33. const cookies = document.cookie.split("; ");
  34. cookies.forEach(cookie => {
  35. const cookieName = cookie.split("=")[0];
  36. deleteCookie(cookieName, domain);
  37. deleteCookie(cookieName, `.${domain}`); // Try subdomains
  38. });
  39. }
  40. // Function to clear local storage, session storage, and cookies
  41. function clearDataForDomain(domain) {
  42. console.log(`Clearing data for domain: ${domain}`);
  43. // Clear cookies for the domain and subdomains
  44. clearCookiesForDomain(domain);
  45. // Clear local storage and session storage
  46. localStorage.clear();
  47. sessionStorage.clear();
  48. }
  49. // Function to clear data for current domain and other specified domains
  50. function clearAllData() {
  51. // Clear data for the current domain
  52. clearDataForDomain(window.location.hostname);
  53. // Clear data for other domains (like Google)
  54. const otherDomains = ["papergames.io", "www.google.com"];
  55. otherDomains.forEach(domain => clearDataForDomain(domain));
  56. alert("Local storage, session storage, and cookies cleared.");
  57. }
  58. // Create "Unban" button in the Greasemonkey/Tampermonkey menu
  59. GM_registerMenuCommand("Unban", clearAllData);
  60. })();