GruszkaCaps

Zamienia wszystkie wpisy @92Gruszka na pisane capsem

スクリプトをインストールするには、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            GruszkaCaps
// @author          Szab
// @description     Zamienia wszystkie wpisy @92Gruszka na pisane capsem
// @include	http://*.wykop.pl/*
// @include	https://*.wykop.pl/*
// @released        2015-06-18
// @updated         2015-06-18
// @grant       none
// @compatible      Greasemonkey
// @version 0.0.1.20151206211048
// @namespace https://greasyfork.org/users/12515
// ==/UserScript==
 
(function(){
 	var occurs = false;
	
	var allcaps = function() { 
		if(occurs) return;
		occurs = true;
		var entries = $('li.entry').find('a.profile[href="http://www.wykop.pl/ludzie/Gruszka92/"]');
		var li = entries.closest('li');
		var contents = li.find('> div > div > div.text > p');
		contents.each( function () {
			var text = $(this).html();
			var html = false;
			var newstring = "";
	
			for(var i = 0; i<text.length; i++) {
				var character = text.charAt(i);
	
				if(html && character == '>')
					html = false;
				else if(!html && character == '<' ) 
					html = true;
				else if(!html){
					character = character.toUpperCase();
				}
		
				newstring = newstring+character;
			}
	
			$(this).html(newstring);
		});
		occurs = false;
	};
 
	$(document).ready(function() {
		allcaps();
		
		$('div[id="content"]').bind('DOMNodeInserted', allcaps);
		$('li.entry').bind('DOMNodeInserted', allcaps);
	});
 
 
})();