<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="zh">
	<id>https://zybkcn.com/w/index.php?action=history&amp;feed=atom&amp;title=MediaWiki%3AGadget-Wordcount.js</id>
	<title>MediaWiki:Gadget-Wordcount.js - 版本历史</title>
	<link rel="self" type="application/atom+xml" href="https://zybkcn.com/w/index.php?action=history&amp;feed=atom&amp;title=MediaWiki%3AGadget-Wordcount.js"/>
	<link rel="alternate" type="text/html" href="https://zybkcn.com/w/index.php?title=MediaWiki:Gadget-Wordcount.js&amp;action=history"/>
	<updated>2026-05-09T22:13:08Z</updated>
	<subtitle>本wiki上该页面的版本历史</subtitle>
	<generator>MediaWiki 1.43.5</generator>
	<entry>
		<id>https://zybkcn.com/w/index.php?title=MediaWiki:Gadget-Wordcount.js&amp;diff=23406&amp;oldid=prev</id>
		<title>入我相思门：​创建页面，内容为“    (function($) {         function bytecount(text) {             text = text.replace(/[\u0000-\u007F]/g, &#039;.&#039;);             text = text.replace(/[\u0080-\u07FF\uD800-\uDFFF]/g, &#039;..&#039;);             text = text.replace(/[\u0800-\uD7FF\uE000-\uFFFF]/g, &#039;...&#039;);             return text.length;         };         function cjkcount(text) {             text = text.replace(/\./g, &#039;&#039;);             text = text.replace(/[\u2E80-\u2E99\u2E9B-\u2EF3\u2F00-\u2FD5\u3005\u3007\u…”</title>
		<link rel="alternate" type="text/html" href="https://zybkcn.com/w/index.php?title=MediaWiki:Gadget-Wordcount.js&amp;diff=23406&amp;oldid=prev"/>
		<updated>2022-04-30T15:00:43Z</updated>

		<summary type="html">&lt;p&gt;创建页面，内容为“    (function($) {         function bytecount(text) {             text = text.replace(/[\u0000-\u007F]/g, &amp;#039;.&amp;#039;);             text = text.replace(/[\u0080-\u07FF\uD800-\uDFFF]/g, &amp;#039;..&amp;#039;);             text = text.replace(/[\u0800-\uD7FF\uE000-\uFFFF]/g, &amp;#039;...&amp;#039;);             return text.length;         };         function cjkcount(text) {             text = text.replace(/\./g, &amp;#039;&amp;#039;);             text = text.replace(/[\u2E80-\u2E99\u2E9B-\u2EF3\u2F00-\u2FD5\u3005\u3007\u…”&lt;/p&gt;
&lt;p&gt;&lt;b&gt;新页面&lt;/b&gt;&lt;/p&gt;&lt;div&gt;    (function($) {&lt;br /&gt;
        function bytecount(text) {&lt;br /&gt;
            text = text.replace(/[\u0000-\u007F]/g, &amp;#039;.&amp;#039;);&lt;br /&gt;
            text = text.replace(/[\u0080-\u07FF\uD800-\uDFFF]/g, &amp;#039;..&amp;#039;);&lt;br /&gt;
            text = text.replace(/[\u0800-\uD7FF\uE000-\uFFFF]/g, &amp;#039;...&amp;#039;);&lt;br /&gt;
            return text.length;&lt;br /&gt;
        };&lt;br /&gt;
        function cjkcount(text) {&lt;br /&gt;
            text = text.replace(/\./g, &amp;#039;&amp;#039;);&lt;br /&gt;
            text = text.replace(/[\u2E80-\u2E99\u2E9B-\u2EF3\u2F00-\u2FD5\u3005\u3007\u3021-\u3029\u3038-\u303B\u3400-\u4DB5\u4E00-\u9FCC\uF900-\uFA6D\uFA70-\uFAD9]|[\uD840-\uD868][\uDC00-\uDFFF]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|[\uD86A-\uD86C][\uDC00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D]|\uD87E[\uDC00-\uDE1D]/g, &amp;#039;.&amp;#039;);&lt;br /&gt;
            text = text.replace(/[^\.]/g, &amp;#039;&amp;#039;);&lt;br /&gt;
            return text.length;&lt;br /&gt;
        };&lt;br /&gt;
        function getwcbytext(text) {&lt;br /&gt;
            return text.length + &amp;#039; character(s) (&amp;#039; + cjkcount(text) + &amp;#039; CJK)&amp;lt;br /&amp;gt;&amp;#039; +&lt;br /&gt;
                bytecount(text) + &amp;#039; byte(s) in &amp;lt;a href=&amp;quot;&amp;#039; +  mw.config.get(&amp;#039;wgScript&amp;#039;) + &amp;#039;?title=UTF-8&amp;quot;&amp;gt;UTF-8&amp;lt;/a&amp;gt; encoding&amp;#039;;&lt;br /&gt;
        };&lt;br /&gt;
        function getsel() {&lt;br /&gt;
            if (!window.getSelection) return &amp;#039;&amp;#039;;&lt;br /&gt;
            return getSelection().toString();&lt;br /&gt;
        };&lt;br /&gt;
        function dowc(event) {&lt;br /&gt;
            $(&amp;#039;.wordcount&amp;#039;).remove(); // or remove after text.length == 0 checking?&lt;br /&gt;
            var text = getsel();&lt;br /&gt;
            if (text.length == 0) return;&lt;br /&gt;
            var divj = $(&amp;#039;&amp;lt;div /&amp;gt;&amp;#039;).html(getwcbytext(text))&lt;br /&gt;
                .css({&lt;br /&gt;
                    &amp;#039;position&amp;#039;: &amp;#039;fixed&amp;#039;,&lt;br /&gt;
                    &amp;#039;right&amp;#039;: &amp;#039;0&amp;#039;,&lt;br /&gt;
                    &amp;#039;bottom&amp;#039;: &amp;#039;0&amp;#039;,&lt;br /&gt;
                    &amp;#039;margin&amp;#039;: &amp;#039;4px&amp;#039;,&lt;br /&gt;
                    &amp;#039;padding&amp;#039;: &amp;#039;6px&amp;#039;&lt;br /&gt;
                })&lt;br /&gt;
                .addClass(&amp;#039;wordcount ui-state-highlight ui-corner-all&amp;#039;)&lt;br /&gt;
                .appendTo(&amp;#039;body&amp;#039;);&lt;br /&gt;
                // we hook keyup, so this may make it flickering&lt;br /&gt;
                // eg when shift, ctrl.etc key up&lt;br /&gt;
                //.hide().fadeIn(&amp;#039;slow&amp;#039;);&lt;br /&gt;
            setTimeout(function() {&lt;br /&gt;
                divj.fadeOut(&amp;#039;slow&amp;#039;);&lt;br /&gt;
            }, 5000);&lt;br /&gt;
        };&lt;br /&gt;
        $(document).mouseup(dowc).keyup(dowc);&lt;br /&gt;
    })(jQuery);&lt;/div&gt;</summary>
		<author><name>入我相思门</name></author>
	</entry>
</feed>