Skip to content

Instantly share code, notes, and snippets.

@simin75simin
Created September 20, 2023 11:49
Show Gist options
  • Save simin75simin/23943557f90260884c41b032130c7e98 to your computer and use it in GitHub Desktop.
Save simin75simin/23943557f90260884c41b032130c7e98 to your computer and use it in GitHub Desktop.
lemmy show top comment userscript
// ==UserScript==
// @name lemmy show top comment
// @namespace http://tampermonkey.net/
// @version 0.1
// @description try to take over the world!
// @author You
// @include https://lemmy.*/post*
// @icon https://www.google.com/s2/favicons?sz=64&domain=lemmy.world
// @require http://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js
// @require https://gist.github.com/raw/2625891/waitForKeyElements.js
// @grant none
// ==/UserScript==
//did not use match as lemmy fediverse domains have host as lemmy.(world|ml|...) which cannot be matched
// see https://stackoverflow.com/questions/20462544/greasemonkey-tampermonkey-match-for-a-page-with-parameters
(function() {
'use strict';
waitForKeyElements ('label:contains("Top")', function (jNode) {
jNode.click();
});
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment