Skip to content

Instantly share code, notes, and snippets.

@azu azu/niconail.js
Created Mar 22, 2010

Embed
What would you like to do?
// ==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
You can’t perform that action at this time.