Last active
September 18, 2023 16:37
-
-
Save kemsakurai/419fd41c3c49fc55a3769fe28de7d7ac to your computer and use it in GitHub Desktop.
Tampermonkey's user script to paste embedded image links from Google Drive 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 Google Drive sb embed img | |
// @namespace http://tampermonkey.net/ | |
// @version 0.1 | |
// @description Google Drive image url for Scrapbox | |
// @author K.Sakurai | |
// @match https://drive.google.com/* | |
// @run-at context-menu | |
// @grant GM_setClipboard | |
// ==/UserScript== | |
(function() { | |
var id = window.location.href.split("/")[5]; | |
var url = "https://drive.google.com/uc?export=view&id=" + id; | |
var href = "[" + url + "&ext=.jpg]"; | |
GM_setClipboard(href); | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment