3
3

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

Qiitaのユーザーページの投稿タイプから検索できるユーザースクリプト

Last updated at Posted at 2015-01-26

http://qiita.com/tbpgr/items/10df8c74cb699059b969
http://qiita.com/suzuki86/items/1d0426d5b24ef5404c16
の、別実装。この実装はonclickを使いません。
どちらを使うかは、好みでどうぞ。

qiita_userpage_search.user.js
// ==UserScript==
// @name        Qiita UserPage Search
// @namespace   com.cielavenir
// @description Tag Type in user page is searchable.
// @include     http://qiita.com/*
// @version     0.0.0.2
// ==/UserScript==

(function(){
	var span=document.querySelector('.userPage_heading > span');
	if(!span)return;
	var user_name=span.textContent;
	var tspan=document.getElementsByTagName('tspan');
	for(var i=0;i<tspan.length;i++){
		var tag=tspan[i].textContent.replace(/.*? - /,'');
		if(tag=='Others')continue;
		var a=document.createElementNS('http://www.w3.org/2000/svg','a');
		a.setAttributeNS('http://www.w3.org/1999/xlink','href','https://qiita.com/search?q=user%3A'+encodeURIComponent(user_name)+'+tag%3A'+encodeURIComponent(tag));
		a.textContent=tspan[i].textContent;
		tspan[i].textContent='';
		tspan[i].appendChild(a);
	}
})();
3
3
1

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
3
3

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?