@-posting

Link to posts in the same 4chan thread with "@".

2015/08/24のページです。最新版はこちら

スクリプトをインストールするには、Tampermonkey, GreasemonkeyViolentmonkey のような拡張機能のインストールが必要です。

You will need to install an extension such as Tampermonkey to install this script.

スクリプトをインストールするには、TampermonkeyViolentmonkey のような拡張機能のインストールが必要です。

スクリプトをインストールするには、TampermonkeyUserscripts のような拡張機能のインストールが必要です。

このスクリプトをインストールするには、Tampermonkeyなどの拡張機能をインストールする必要があります。

このスクリプトをインストールするには、ユーザースクリプト管理ツールの拡張機能をインストールする必要があります。

(ユーザースクリプト管理ツールは設定済みなのでインストール!)

このスタイルをインストールするには、Stylusなどの拡張機能をインストールする必要があります。

このスタイルをインストールするには、Stylus などの拡張機能をインストールする必要があります。

このスタイルをインストールするには、Stylus tなどの拡張機能をインストールする必要があります。

このスタイルをインストールするには、ユーザースタイル管理用の拡張機能をインストールする必要があります。

このスタイルをインストールするには、ユーザースタイル管理用の拡張機能をインストールする必要があります。

このスタイルをインストールするには、ユーザースタイル管理用の拡張機能をインストールする必要があります。

(ユーザースタイル管理ツールは設定済みなのでインストール!)

このスクリプトの質問や評価の投稿はこちら通報はこちらへお寄せください
// ==UserScript==
// @name        @-posting
// @version     0.2.1.0
// @namespace   atposting
// @license     WTFPL
// @include     *://boards.4chan.org/g/*
// @run-at      document-end
// @grant       none
// @description Link to posts in the same 4chan thread with "@".
// ==/UserScript==
var twitterify = function(targets) {
	Array.prototype.forEach.call(targets, function(target) {
		target.innerHTML = target.innerHTML.replace(
			/@([0-9]+)/,
			'<a href="#p$1" class="quotelink">@$1</a>'
		);	
	});
};
var observer = new MutationObserver(function(mutations) {
	mutations.forEach(function(mutation) {
		twitterify(mutation.addedNodes);
	});
});
observer.observe(document.querySelector('.board .thread'), { attributes: true, childList: true });
twitterify(document.querySelectorAll('.postMessage'));