[node,title,fragment] bookmarklet

• 23 Dec 2022 - 23:57

Online doc reccomends Link to the page's node number, not the page's URL which requires clicking 'Edit' and brews typo error. This bookmarklet (wikipedia) provides a way to get the required syntax in one click:

javascript:void function(){prompt("",`[node:${drupalSettings.path.currentPath.replace("node/","")}${document.querySelector("meta[property=\"og:title\"]").content?`,title="${document.querySelector("meta[property=\"og:title\"]").content}"`:""}${window.location.hash?`,fragment="${decodeURIComponent(window.location.hash).replace("#","")}"`:""}]`)}();

(highlight and drag to bookmark toolbar)
Happy holidays


Reacties

Do you still have an unanswered question? Log eerst in om je vraag te plaatsen.