From 85c6df87d2b48e92795811eaee36be421ad2120f Mon Sep 17 00:00:00 2001 From: Glorfindel Date: Wed, 19 Sep 2018 12:06:59 +0200 Subject: [PATCH] Improved Tag Popup v0.1 --- improved-tag-popup/improved-tag-popup.user.js | 30 +++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 improved-tag-popup/improved-tag-popup.user.js diff --git a/improved-tag-popup/improved-tag-popup.user.js b/improved-tag-popup/improved-tag-popup.user.js new file mode 100644 index 0000000..58b512f --- /dev/null +++ b/improved-tag-popup/improved-tag-popup.user.js @@ -0,0 +1,30 @@ +// ==UserScript== +// @name Improved Tag Popup +// @namespace https://github.com/Glorfindel83/ +// @description Adds a link to the tag information page (wiki + excerpt) to the tag popup +// @author Glorfindel +// @updateURL https://raw.githubusercontent.com/Glorfindel83/SE-Userscripts/master/improved-tag-popup/improved-tag-popup.user.js +// @downloadURL https://raw.githubusercontent.com/Glorfindel83/SE-Userscripts/master/improved-tag-popup/improved-tag-popup.user.js +// @version 0.1 +// @match *://*.stackexchange.com/* +// @match *://*.stackoverflow.com/* +// @match *://*.superuser.com/* +// @match *://*.serverfault.com/* +// @match *://*.askubuntu.com/* +// @match *://*.stackapps.com/* +// @match *://*.mathoverflow.net/* +// @grant none +// @require https://gist.github.com/raw/2625891/waitForKeyElements.js +// ==/UserScript== + +waitForKeyElements("div.tag-popup", function(jNode) { + jNode.find("a").filter(function() { + return $(this).text() === "View tag"; + }).each(function() { + $(this).text("Other questions"); + var tagName = $(this).attr("href").split("/").pop(); + $("
").insertBefore($(this)); + $("More info").insertBefore($(this)); + $(" | ").insertBefore($(this)); + }); +}) \ No newline at end of file