B!
@@ -1,11 +1,16 @@
/*
- * @title open new tab/window
- * @description assert open new tab/window or pop-up
+ * @title B!
+ * @description open Hatena::Bookmark in new tab/window
* @include http://*
- * @contributor noromanba
- * @license CC0 Univ PD http://creativecommons.org/publicdomain/zero/1.0/
+ * @include https://*
+ * @contributor dankogai http://let.hatelabo.jp/dankogai/let/gYC-xpO_j7qpDw (Fork of)
+ * @author noromanba http://let.hatelabo.jp/noromanba/let/gYC-y5_1hrbuWA
+ * @license MIT License
+ * @javascript_url
*/
(function () {
- window.open('about:blank');
-})();
+ // canonical for https; e.g. https://www.youtube.com/watch?v=OKOrkLxOBoY
+ var url = (document.head.querySelector('link[href][rel=canonical]') || {}).href || location.href;
+ window.open('http://b.hatena.ne.jp/entry/' + url, '_blank');
+})();
(function () {
var url = (document.head.querySelector('link[href][rel=canonical]') || {}).href || location.href;
window.open('http://b.hatena.ne.jp/entry/' + url, '_blank');
})();
- Permalink
- このページへの個別リンクです。
- RAW
- 書かれたコードへの直接のリンクです。
- Packed
- 文字列が圧縮された書かれたコードへのリンクです。
- Userscript
- Greasemonkey 等で利用する場合の .user.js へのリンクです。
- Loader
- @require やソースコードが長い場合に多段ロードする Loader コミのコードへのリンクです。
- Metadata
- コード中にコメントで @xxx と書かれたメタデータの JSON です。