This file contains hidden or 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
// Jetpack Feature : hello-jetpack.js | |
// ページを開いたら通知する | |
jetpack.tabs.onReady(function() { | |
jetpack.notifications.show("Hello Jetpack!"); | |
}); |
This file contains hidden or 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
// jetpack feature : info.js | |
// info ボタンを押すと選択部分を Google で検索し、 | |
// 検索件数を alert する | |
jetpack.statusBar.append({ | |
html: "<button>info</button>", | |
width: 60, | |
onReady: function(widget) { | |
$(widget).click(function() { | |
var word = jetpack.tabs.focused.contentWindow.getSelection(); |
This file contains hidden or 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
// Jetpack feature : disable-hatena-keyword-pageMods.js | |
// はてなダイアリー (http://d.hatena.ne.jp/) のキーワードを無効化する | |
// pageMods を使用するバージョン | |
jetpack.future.import("pageMods"); | |
var callback = function(targetDocument) { | |
$(targetDocument).find("a.keyword").each(function() { | |
$(this).replaceWith($(this).html()); | |
}); | |
}; |
This file contains hidden or 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
// Jetpack feature : log-url.js | |
// ページを開いたらそのページの URL をログ表示する | |
jetpack.tabs.onReady(function(targetDocument) { | |
// frame, ifreme の場合は何もしない | |
if (targetDocument.defaultView.frameElement) { | |
return; | |
} | |
console.log(targetDocument.location.href); |
This file contains hidden or 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
// Jetpack Feature : disable-hatena-keyword.js | |
// はてなダイアリー (http://d.hatena.ne.jp/) の | |
// キーワードを無効化する | |
jetpack.tabs.onReady(function(targetDocument) { | |
if (targetDocument.defaultView.frameElement) { | |
return; | |
} | |
if (targetDocument.location.href.search(/^http:\/\/d.hatena.ne.jp\//) !== -1) { |
NewerOlder