From 7483e3e4af1cb83b5c6969a63f6ddac425447eb8 Mon Sep 17 00:00:00 2001 From: blankie Date: Thu, 17 Aug 2023 16:24:55 +1000 Subject: [PATCH] Update Elements with ID lister to 1.0.14 - Explicitly set target=_self for links so that they don't open in another tab for sites with (example: https://www.cia.gov/the-world-factbook/countries/chad) --- Elements with ID lister.user.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Elements with ID lister.user.js b/Elements with ID lister.user.js index 8ca96ac..053d27a 100644 --- a/Elements with ID lister.user.js +++ b/Elements with ID lister.user.js @@ -6,7 +6,7 @@ // @grant GM_getResourceURL // @require https://cdn.jsdelivr.net/npm/dialog-polyfill@0.5.6/dist/dialog-polyfill.min.js#sha256-cec1a2e320aab77e28bad4ad6bc5e532a6ef5757345c19bb5158aa880b7162a6 // @resource dialogPolyfillCSS https://cdn.jsdelivr.net/npm/dialog-polyfill@0.5.6/dist/dialog-polyfill.min.css#sha256-4dcb3ab62e545f30bf06a4824c253641ee889ca85ca28d5447590557922496ab -// @version 1.0.13 +// @version 1.0.14 // @author blankie // @description A userscript that adds a "Show elements popup" option to the Monkey Menu which lists all elements with an ID // @inject-into content @@ -191,6 +191,7 @@ function getElementListItem(element, id) { let a = document.createElement("a"); newLocation.hash = a.innerText = "#" + id; a.href = newLocation.href; + a.target = "_self"; a.addEventListener("click", function(e) { if (e.ctrlKey) { return;