Last active
December 10, 2021 17:43
-
-
Save kemsakurai/6e520c86fbdfcbdb18f6151bae3ffbfe to your computer and use it in GitHub Desktop.
Tampermonkey's user script to get the link string of a web page in Scrapbox format.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name Copy scrapbox page link | |
// @namespace http://tampermonkey.net/ | |
// @version 0.1 | |
// @description Scrapboxに貼り付けるWebページのリンク文字列を取得する | |
// @author K.Sakurai | |
// @grant none | |
// @run-at context-menu | |
// @grant GM_setClipboard | |
// ==/UserScript== | |
(function() { | |
var hrefText = '[' + document.title.replace(/\s*[\[\]]\s*/g, ' ') + ' ' + location.href + ']'; | |
GM_setClipboard(hrefText); | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment