Skip to content

Instantly share code, notes, and snippets.

@nkmathew
Created February 19, 2016 10:26
Show Gist options
  • Save nkmathew/665bb596bee09738b4b5 to your computer and use it in GitHub Desktop.
Save nkmathew/665bb596bee09738b4b5 to your computer and use it in GitHub Desktop.
GreaseMonkey script that makes sure reddit thread links in upvoted.com open in the same tab
// ==UserScript==
// @name Open Thread Links in Same Tab(upvoted.com)
// @namespace nkmathew.github.io
// @description Makes sure reddit thread links in upvoted.com open in the same tab
// @version 1.0
// @include /^https?:\/\/(.+\.)?upvoted\.com\/?.*$/
// @require http://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js
// @grant GM_getValue
// @grant GM_setValue
// ==/UserScript==
(function () {
window.addEventListener('load', function () {
$('a[target="_blank"]').removeAttr('target');
}, false);
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment