Last active
August 27, 2015 17:33
-
-
Save Oisann/00c1ef39e5960a015869 to your computer and use it in GitHub Desktop.
Moves OddshotBot's comment to the top of the comment list on reddit threads
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name OddshotBot | |
// @namespace https://www.oisann.net/ | |
// @version 1.1 | |
// @description Moves OddshotBot's comment to the top of the comment list on reddit threads | |
// @author Oisann, Kebabpizza | |
// @match http*://*.reddit.com/r/*/comments/* | |
// @grant none | |
// ==/UserScript== | |
if($('a.title').attr('href').toLowerCase().indexOf("oddshot.tv")) { //Link check | |
var post = $(".commentarea a.author[href$='/user/OddshotBot']").parent().parent().parent(); //Comment + children | |
post.parent().prepend(post); //Move it to the top | |
post.css({outline: "1px solid #FF0000"}); //Red outline | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Thanks to @Kebabpizza for the 1.1 update!
Source: https://gist.github.com/Kebabpizza/ee8ed1032d66523fec27