Created
May 18, 2016 08:11
-
-
Save kateinoigakukun/8c7068ee4e91ea2fdee67bf78f05072a 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
var title = "Wikipedia"; | |
var iconURL = "https://ja.m.wikipedia.org/static/apple-touch/wikipedia.png"; | |
var linkItemFormat = "http://wikipedia.org/wiki/Special:Search/_Q_" | |
OHJConvertImgToBase64(iconURL,function(base64Image){ | |
base64Image = base64Image.replace(/^data.+?base64,/, ''); | |
window.webkit.messageHandlers.oooDidClickAddLinkItem.postMessage([title,linkItemFormat,base64Image]) | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Ohajiki