G.E Auto Note Favourites

Fills the notes section with the gallery's tags when favouriting.

目前為 2015-02-26 提交的版本,檢視 最新版本

您需要先安裝使用者腳本管理器擴展,如 TampermonkeyGreasemonkeyViolentmonkey 之後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyViolentmonkey 後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyViolentmonkey 後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyUserscripts 後才能安裝該腳本。

你需要先安裝一款使用者腳本管理器擴展,比如 Tampermonkey,才能安裝此腳本

您需要先安裝使用者腳本管理器擴充功能後才能安裝該腳本。

(我已經安裝了使用者腳本管理器,讓我安裝!)

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

(我已經安裝了使用者樣式管理器,讓我安裝!)

// ==UserScript==
// @name        G.E Auto Note Favourites
// @description	Fills the notes section with the gallery's tags when favouriting.
// @author      Hen-Tie
// @homepage	http://hen-tie.tumblr.com/
// @namespace   https://greasyfork.org/en/users/8336
// @include     http://g.e-hentai.org/gallerypopups.php?gid=*
// @include     https://g.e-hentai.org/gallerypopups.php?gid=*
// @include     http://exhentai.org/gallerypopups.php?gid=*
// @include     https://exhentai.org/gallerypopups.php?gid=*
// @grant	GM_getValue
// @grant	GM_setValue
// @run-at 	document-start
// @require	http://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js
// @icon        https://i.imgur.com/RPv1X1r.png
// @version	1.0
// ==/UserScript==
jQuery(document).ready(function($) {
	$('label[for^=fav]').click(function(){
		var str = $("#taglist a[id^='ta_female'], #taglist a[id^='ta_parody'], #taglist a[id^='ta_group'], #taglist a[id^='ta_artist'], #taglist a[id^='ta_male'], #taglist a[id^='ta_female'], #taglist td#miscid+td a", window.opener.document).append("\u200B").text();
		str = str.replace(/full censorship|mosaic censorship|incomplete|out of order|scanmark|poor grammar/g, '');
		str = str.replace(/ /g, '_');
		str = str.replace(/\u200B/g, ', ');
		str = str.replace(/(, )+/g, ', ');
		str = str.substr(0, str.length-2);
		$('textarea').val(str)
	});
});