Some websites require use of JavaScript and use cookies or similar technologies that are often used for tracking rather than for remembering preferences. This userscript removes all data that websites remember while you are using websites, unless there are sites you explicitly add to prevent this from happening. This is not a replacement for a tracker blocker, it does not block network requests to tracking scripts.
The functionality of web pages may break when using this userscript.
You can a list of websites within the code to not clear website data from.
To do this, open your userscript manager's menu, find this script then edit it.
The only parts that should be edited are between the // start config
and // end config
comments.
//
means a comment - remove it to active the exclusion.
// start config
// clearWebsiteDataEveryXMilliseconds takes any number
var clearWebsiteDataEveryXMilliseconds = 200;
// runs on websites unless listed here
// made using regular expressions - flags are ignored
// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_expressions
// https://regex101.com
var websitesToNotRunOn = [
// cookies required for websites to work
// anything requiring google account:
// /^https:\/\/accounts\.google\.com/,
// google docs:
// /^https:\/\/docs\.google\.com/,
// /^https:\/\/contacts\.google\.com/,
// stay signed into youtube:
// /^https:\/\/accounts\.youtube\.com/,
// /^https:\/\/(www|m)\.youtube\.com/,
// stay signed into soundcloud account
// /^https:\/\/secure\.soundcloud\.com/,
// /^https:\/\/soundcloud\.com/,
// reddit requires cookies to work even without account
// /^https:\/\/www\.reddit\.com/,
// cookies that are needed to remember preferences
// /^https:\/\/search\.brave\.com/,
// /^https:\/\/([a-z]+\.)?wikipedia\.org/,
];
// end config
It is possible to apply this userscript to some mobile browsers.
On iOS using Safari (iOS 15+):
- Open "App Store"
- Go to "Search" and type "userscripts"
- The result should be https://apps.apple.com/us/app/userscripts/id1463298887
- Install "Userscripts"
- Open "Settings"
- Search for "Safari"
- Scroll down to "Extensions" and tap it
- Switch on "Allow Extension"
- Allow on "greasyfork.org" and "Other Websites"
- Open "Safari"
- Tap the icon on the left side of the url bar
- Tap "Manage Extensions"
- Make sure "Userscripts" is enabled then tap on "Done"
- Switch back to this page in Safari and tap "Install this script". The raw code should be displayed from a greasyfork url.
- Tap the icon on the left side of the url bar
- Tap "Userscripts". There should be a message that says "Userscript Detected: Tap to install". Click it.
- This userscript will then be installed
- To edit the code:
- Open "App Store"
- Go to "Search" and type "subtext"
- The result should be https://apps.apple.com/us/app/subtext/id1606625287
- Install "Subtext"
- Open "Subtext"
- Click on the file name of this userscript then start editing. All edits seem to be saved instantly, but you will need to refresh tabs for the changes to be applied.