Created
March 26, 2010 01:56
-
-
Save osamu2001/344385 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
//Copyright bill.mill(tabcopy),ryuusei(Copy Title+URL to clipboard) | |
<script> | |
function copyToClipboard(str) { | |
var obj=document.getElementById("hbnaclhngkhpmpgmfakaghgjbblokeeh"); | |
if( obj ){ | |
obj.value = str; | |
obj.select(); | |
document.execCommand("copy", false, null); | |
} | |
} | |
function copyallwindows() { | |
win = chrome.windows.getCurrent(function(win) { | |
chrome.tabs.getAllInWindow(win.id, function(tabs) { | |
var s = ""; | |
for (var i=0; i < tabs.length; i++) { | |
s += tabs[i].title + '\n' + tabs[i].url + '\n'; | |
} | |
copyToClipboard(s); | |
window.close(); | |
}) | |
}); | |
//chrome-extension://knjcakomgdkfclbkoapiobdonobblkab/popup.html | |
} | |
copyallwindows(); | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment