Created
August 16, 2008 10:16
-
-
Save tobynet/5707 to your computer and use it in GitHub Desktop.
UserActionScript of copy Pukiwiki link for Sleipnir 2
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
/* | |
copy_pukiwiki_link ver 0.1.0 | |
modified by TOBY http://tobysoft.net/ | |
original script by stabucky "auto_link_get.js" | |
http://stabucky.blogzine.jp/stabucky/2005/05/sleipnirurl_e798.html | |
*/ | |
(function(){ | |
var pnir = new ActiveXObject("Sleipnir.API"); | |
var id = pnir.GetDocumentID(pnir.ActiveIndex); | |
var document = pnir.GetDocumentObject(id); | |
var window = pnir.GetWindowObject(id); | |
if(document==null){ | |
pnir.MessageBox("Documentオブジェクトを作成できません"); | |
}else{ | |
//タイトル | |
var title = document.title.replace(/\#.*/,""); | |
var url = document.location.href.replace(/\#.*/,""); | |
var text = "[[" + title + ":" + url + "]]"; | |
window.clipboardData.setData("text", text); | |
} | |
}()); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment