Created
March 22, 2010 14:46
-
-
Save azu/340142 to your computer and use it in GitHub Desktop.
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 [ポップアップ] 情報を加工してクリップボードに格納 | |
// @namespace http://superrush.blog65.fc2.com/ | |
// @description MakeLinkみたいにページ情報を格納したり、クリップボードの中身を再加工するスクリプトです。 | |
// ==/UserScript== | |
function copySting(str){ | |
// XPCOMを呼び出す | |
var ss = Cc["@mozilla.org/widget/clipboardhelper;1"].getService(Ci.nsIClipboardHelper); | |
ss.copyString(str); | |
} | |
var title = content.document.title.replace("‐ニコニコ動画(9)", ""); | |
var videoID = content.location.href.replace("http://www.nicovideo.jp/watch/",""); | |
var templete = '<a target="_blank" href="http://www.nicovideo.jp/watch/'+ videoID +'"><img alt="'+title+'" src="http://niconail.info/'+ videoID +'"></a>' | |
copySting(templete); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment