[node,title,fragment] bookmarklet

• 2022/12/23 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


コメント

まだ解決していない質問がありますか? 質問を投稿するにはまずログインしてください