Enhance绅士漫画

加强一下 绅士漫画 网站的体验

Aby zainstalować ten skrypt, wymagana jest instalacje jednego z następujących rozszerzeń: Tampermonkey, Greasemonkey lub Violentmonkey.

Aby zainstalować ten skrypt, wymagana jest instalacje jednego z następujących rozszerzeń: Tampermonkey, Violentmonkey.

Aby zainstalować ten skrypt, wymagana jest instalacje jednego z następujących rozszerzeń: Tampermonkey, Violentmonkey.

Aby zainstalować ten skrypt, wymagana będzie instalacja rozszerzenia Tampermonkey lub Userscripts.

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

Aby zainstalować ten skrypt, musisz zainstalować rozszerzenie menedżera skryptów użytkownika.

(Mam już menedżera skryptów użytkownika, pozwól mi to zainstalować!)

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.

Będziesz musiał zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

Będziesz musiał zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

Musisz zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

(Mam już menedżera stylów użytkownika, pozwól mi to zainstalować!)

// ==UserScript==
// @name         Enhance绅士漫画
// @namespace    Enhance-绅士漫画-heroboy
// @description  加强一下 绅士漫画 网站的体验
// @author       heroboy
// @version      0.3
// @match        https://www.wnacg.net/*
// @match        https://www.wnacg.com/*
// @match        https://www.wnacg.org/*
// @grant        unsafeWindow
// ==/UserScript==

(function() {
	'use strict';
	var style = `
    .title{
        white-space:normal!important;
    }
`;
	var $ = unsafeWindow.$;
	var styleNode = document.createElement('style');
	styleNode.appendChild(document.createTextNode(style));
	document.head.appendChild(styleNode);

	//add button
	var buttonNode = $("<button id='to_slide_button' style='width:300px;height:50px;font-size:20px;'>To Slide</button>");
	$('.asTBcell.uwconn').prepend($("<br/>")).prepend(buttonNode);
	if (buttonNode[0])
	{
		buttonNode[0].addEventListener('click',function(){
            if (/\/photos-index-aid-.*\.html/i.exec(location.pathname))
			{
				location.pathname = location.pathname.replace('index','slide');
			}
		});
	}
        //
        $('.gallary_item a').attr('target','_blank')
})();