Last active
December 10, 2015 06:48
-
-
Save equinox79/4396773 to your computer and use it in GitHub Desktop.
office365_bookmarklet.js(つくりかけです/本当は作成ウィンドウに流し込みたいが無理っぽい)
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
// 選択した文字列をコピー&全員に返信 | |
javascript:(function(){ | |
var r = document.selection.createRange(); | |
if(r.text.length > 0){ | |
clipboardData.setData("Text", r.text.replace(/\n/g, "\n> ").replace(/^/g, "> ")); | |
}; | |
document.getElementById('imgReplyAllIcon').fireEvent("onclick"); | |
})(); | |
/* | |
javascript:(function(){ var r = document.selection.createRange(); if(r.text.length > 0){ clipboardData.setData("Text", r.text.replace(/\n/g, "\n> ").replace(/^/g, "> ")); }; document.getElementById('imgReplyAllIcon').fireEvent("onclick");})(); | |
*/ | |
// 全員に返信ボタン押下時に選択文字列をクリップボードにコピー | |
javascript:(function(){ | |
var f = function(e, cf, r){ | |
if(r.text.length > 0){ | |
clipboardData.setData("Text", r.text.replace(/\n/g, "\n> ").replace(/^/g, "> ")); | |
cf(); | |
}; | |
}; | |
document.getElementById('divNavHostBody').attachEvent("onmouseover", function(){ | |
document.getElementById('imgReplyAllIcon').attachEvent("onclick", function(event){ | |
var cf = document.getElementById('imgReplyAllIcon').click; | |
f(event, cf, document.selection.createRange()); | |
}); | |
}); | |
})(); | |
/* | |
javascript:(function(){ var f = function(e, cf, r){ if(r.text.length > 0){ clipboardData.setData("Text", r.text.replace(/\n/g, "\n> ").replace(/^/g, "> ")); cf(); }; }; document.getElementById('divNavHostBody').attachEvent("onmouseover", function(){ document.getElementById('imgReplyAllIcon').attachEvent("onclick", function(event){ var cf = document.getElementById('imgReplyAllIcon').click; f(event, cf, document.selection.createRange()); }); });})(); | |
*/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment