[node,title,fragment] bookmarklet

• Gru 23, 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


Komentarai

Do you still have an unanswered question? Please log in first to post your question.