ShindanmakerHashtag"SoT"Script

診断メーカー内のハッシュタグ検索に加えTwitterの検索ボタンを追加します。長期間のエゴサ用に。

You will need to install an extension such as Tampermonkey, Greasemonkey or Violentmonkey to install this script.

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

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

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

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

You will need to install a user script manager extension to install this script.

(I already have a user script manager, let me install it!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

(I already have a user style manager, let me install it!)

// ==UserScript==
// @name        ShindanmakerHashtag"SoT"Script
// @namespace   https://twitter.com/KamakuraChannel
// @description	診断メーカー内のハッシュタグ検索に加えTwitterの検索ボタンを追加します。長期間のエゴサ用に。
// @match       https://shindanmaker.com/*
// @author      カマクラ (Kamakura)
// @version     2.0
// @grant       none
// ==/UserScript==
// スクリプト名の"SoT"とはSearch on Twitterのことです。

(function () {
	let links = document.querySelectorAll('a.hashtaglabel');
	if (links) {
		let tag = [];
		const newButton = function(tagname) {
			return '<a class="hashtaglabel" href="https://www.twitter.com/hashtag/' + tagname + '?src=hash" target="_blank">SoT</a>';
		};

		links.forEach(function(v,i) {
			tag[i] = v.getAttribute('href').split('?sw=%23')[1];
			v.outerHTML += newButton(tag[i]);
		});
	}
}) ();