Skip to content

Instantly share code, notes, and snippets.

@thefloodshark thefloodshark/.js
Created Apr 2, 2018

What would you like to do?
Tampermonkey UserScript - Automatic Tab Closer Based on Designated URL Text
// ==UserScript==
// @name Autoclose URL
// @namespace Autoclose URL
// @include *
// @grant window.close
// ==/UserScript==
function check_if_should_close(url) {
if (url.match(/rnoreward/))
return true;
return false;
if (check_if_should_close(document.location.href)) {
var win ='your current page URL', '_self', '');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.