Skip to content

Instantly share code, notes, and snippets.

@heavyLobster2
Created September 12, 2018 03:25
Show Gist options
  • Save heavyLobster2/7b23d50626e8d3ecc4b423a4d0a7ced9 to your computer and use it in GitHub Desktop.
Save heavyLobster2/7b23d50626e8d3ecc4b423a4d0a7ced9 to your computer and use it in GitHub Desktop.
// ==UserScript==
// @name Always Search Subreddit
// @description Checks the box to limit reddit search to the current subreddit
// @version 1.0.0
// @author heavyLobster2
// @namespace github.com/heavyLobster2
// @downloadURL https://gist.github.com/heavyLobster2/7b23d50626e8d3ecc4b423a4d0a7ced9/raw/AlwaysSearchSubreddit.user.js
// @include *://*.reddit.com/*
// @run-at document-idle
// @grant none
// ==/UserScript==
(function () {
"use strict";
var box = document.querySelector("input[name=\"restrict_sr\"]");
if (box && !box.checked) { box.click(); }
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment