Skip to content

Instantly share code, notes, and snippets.

@azu
Created March 22, 2010 14:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save azu/340142 to your computer and use it in GitHub Desktop.
Save azu/340142 to your computer and use it in GitHub Desktop.
// ==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