archive
by
rikuba
2013-09-26 [2013/09/26 04:22:32]
記事一覧を開く
@@ -1,49 +1,11 @@
/*
- * @title archive
- * @description 記事一覧を開く
+ * @title page_back
+ * @description ページ内リンクの履歴をスキップして戻る
* @include http://*
- * @license MIT License
+ * @license CC0 <http://creativecommons.org/publicdomain/zero/1.0/>
*/
-(function (url) {
- [
- {/* はてなダイアリー・はてなグループ */
- pattern: /^http:\/\/(?:d|[-\w]+\.g)\.hatena\.ne\.jp\/[-\w]+\//,
- replace: '$&archive'
- },
- {/* はてなブログ */
- pattern: /^http:\/\/[-\w]+\.(?:hatena(?:blog|diary)\.(?:com|jp)|hateblo\.jp)\//,
- replace: '$&archive'
- },
- {/* FC2ブログ */
- pattern: /^http:\/\/[-\w]+\.blog\d*\.fc2\.com\//,
- replace: '$&archives.html'
- },
- {/* gooブログ */
- pattern: /^http:\/\/blog\.goo\.ne\.jp\/[-\w]+/,
- replace: '$&/arcv'
- },
- {/* Yahoo!ブログ */
- pattern: /^http:\/\/blogs\.yahoo\.co\.jp\/[-\w]+/,
- replace: '$&/MYBLOG/yblog.html?m=l'
- },
- {/* アメーバブログ */
- pattern: /^http:\/\/ameblo\.jp\/[-\w]+/,
- replace: '$&/entrylist.html'
- },
- {/* 楽天ブログ */
- pattern: /^http:\/\/plaza\.rakuten\.co\.jp\/[-\w]+/,
- replace: '$&/diaryall/'
- },
- {/* Tumblr */
- pattern: /^http:\/\/[-\w]+\.tumblr\.com\//,
- replace: '$&archive'
- }
- ].some(function (siteinfo) {
- var m = siteinfo.pattern.exec(url);
- if (m) {
- location.href = m[0].replace(siteinfo.pattern, siteinfo.replace);
- return true;
- }
- });
-})(location.href);
+(function () {
+ window.addEventListener('hashchange', function (e) { history.back(); }, false);
+ history.back();
+})();
/*
* @title page_back
* @description ページ内リンクの履歴をスキップして戻る
* @include http://*
* @license CC0 <http://creativecommons.org/publicdomain/zero/1.0/>
*/
(function () {
window.addEventListener('hashchange', function (e) { history.back(); }, false);
history.back();
})();
- Permalink
- このページへの個別リンクです。
- RAW
- 書かれたコードへの直接のリンクです。
- Packed
- 文字列が圧縮された書かれたコードへのリンクです。
- Userscript
- Greasemonkey 等で利用する場合の .user.js へのリンクです。
- Loader
- @require やソースコードが長い場合に多段ロードする Loader コミのコードへのリンクです。
- Metadata
- コード中にコメントで @xxx と書かれたメタデータの JSON です。