Firefox:Dive Into Greasemonkey/5.5. Case study: Dumb Quotes
Mozilla中文Wiki
您的位置:Dive Into Greasemonkey → 实例研究 → 实例研究: Dumb Quotes
5.5. 实例研究: Dumb Quotes
Converting smart quotes to dumb quotes
DumbQuotes was born out of a frustration shared by many webloggers: most publishing software can automatically convert straight ASCII quotes to "smart quotes", but the same software is stupid about handling "smart quotes" when an author copies and pastes them into an article. A common example is a blogger who wants to quote a passage from another site. They select a few sentences in their web browser, paste it into a web form to post to their own site, and the passage they pasted ends up looking nothing like the original site because their publishing software doesn't track character encoding properly.
嗯,我不能修复世界上的每个出版系统,但是我能为自己修复这个问题,编写了一个自动转换 smart 引号和其他令人不解的高位字符为7位ASCII等价字符。
例子:dumbquotes.user.js (http://diveintogreasemonkey.org/download/dumbquotes.user.js)
// ==UserScript==
// @name DumbQuotes
// @namespace http://diveintogreasemonkey.org/download/
// @description straighten curly quotes and apostrophes, simplify fancy dashes, etc.
// @include *
// ==/UserScript==
var replacements, regex, key, textnodes, node, s;
replacements = {
"\xa0": " ",
"\xa9": "(c)",
"\xae": "(r)",
"\xb7": "*",
"\u2018": "'",
"\u2019": "'",
"\u201c": '"',
"\u201d": '"',
"\u2026": "...",
"\u2002": " ",
"\u2003": " ",
"\u2009": " ",
"\u2013": "-",
"\u2014": "--",
"\u2122": "(tm)"};
regex = {};
for (key in replacements) {
regex[key] = new RegExp(key, 'g');
}
textnodes = document.evaluate(
"//text()",
document,
null,
XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE,
null);
for (var i = 0; i < textnodes.snapshotLength; i++) {
node = textnodes.snapshotItem(i);
s = node.data;
for (key in replacements) {
s = s.replace(regex[key], replacements[key]);
}
node.data = s;
}
这段代码可以分解为四步:
1. 定义了替换字符串的列表,映射确定的8位字符到它们对应的7位字符。 2. 获得当前页面的所有文字节点。 3. 遍历文字节点列表。 4. 在每个文字节点zhogn,对于8位字符,替换为它的7位等价字符。
第一步事实上是两步。 Javascript 的字符串替换是基于正则表达式的。所有为了替换8位字符为7位等价字符,我实际上需要创建一个正则表达式对象集合。
replacements = {
"\xa0": " ",
"\xa9": "(c)",
"\xae": "(r)",
"\xb7": "*",
"\u2018": "'",
"\u2019": "'",
"\u201c": '"',
"\u201d": '"',
"\u2026": "...",
"\u2002": " ",
"\u2003": " ",
"\u2009": " ",
"\u2013": "-",
"\u2014": "--",
"\u2122": "(tm)"};
regex = {};
for (key in replacements) {
regex[key] = new RegExp(key, 'g');
}
我使用了花括号语法来快速建立组合数组。这等价于单独分配每个关键字对(但是键入更少):
replacements["\xa0"] = " "; replacements["\xa9"] = "(c)"; replacements["\xae"] = "(r)"; // and so forth
单独的8位字符表示为它们的十六进制值,使用了 escaping 语法 "\xa0" 或者 "\u2018"。一旦我们有了字符到字符串的组合数组,我遍历了这个数组同时建立了正则表达式对象列表。每个正则表达式对象会为一个8位字符对全局搜索。(第二个参数 ‘g’ 意味着全局搜索;否则每个正则表达式只会搜索和替换第一次出现的特殊8位字符,而且我可能丢失那些应该被替换的字符串 。)
The next step is to get a list of all the text nodes in the current document. You might be tempted to say to yourself, "Hey, I could just use document.body.innerHTML and get the whole page as a single string, and search and replace in that."
var tmp = document.body.innerHTML; // do a bunch of search/replace on tmp document.body.innerHTML = tmp;
But this is a bad habit to get into, because the innerHTML property will return the entire source of the page: all the markup, all the script, all the attributes, everything. In this case it probably wouldn't cause a problem (HTML tags themselves do not contain 8-bit characters), but in other cases it could be disastrous, and very difficult to debug. You need to ask yourself what exactly you are trying to search-and-replace. If the answer is "the raw page source," then go ahead and use innerHTML. However, in this case, the answer is "all the text on the page," so the correct solution is to use an XPath query to get all the text nodes.
textnodes = document.evaluate(
"//text()",
document,
null,
XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE,
null);
This works by using an XPath function, text(), which matches any text node. You're probably more familiar with querying for element nodes: a list of all the <a> elements, or all the <img> elements that have an alt attribute. But the DOM also contains nodes for the actual text content within elements. (There are other types of nodes too, like comments and processing instructions.) And it's the text nodes that we're interested in at the moment.
Step 3 is to loop through all the text nodes. This is exactly the same as looping through all the elements returned from an XPath query like //a[@href]; the only difference is that each item in the loop is a text node, not an element node.
for (var i = 0; i < textnodes.snapshotLength; i++) {
node = textnodes.snapshotItem(i);
s = node.data;
// do replacements
node.data = s;
node is the current text node in the loop, and s is a string that is the actual text of node. I'm going to use s to do the replacements, then copy the result back to the original node.
So now that I have the text of a single node, I need to actually do the replacements. Since I pre-created a list of regular expressions and a list of replacement string, this is relatively straightforward.
for (key in replacements) {
s = s.replace(regex[key], replacements[key]);
}
下载
- dumbquotes.user.js (http://diveintogreasemonkey.org/download/dumbquotes.user.js)
另见
Strict Standards: Non-static method Namespace::getUser() should not be called statically, assuming $this from incompatible context in /home/mozcn/html/mediawiki-1.3.18/includes/Title.php on line 510
Strict Standards: Non-static method Title::newFromText() should not be called statically, assuming $this from incompatible context in /home/mozcn/html/mediawiki-1.3.18/includes/Skin.php on line 1450
Strict Standards: Non-static method Namespace::getCanonicalIndex() should not be called statically, assuming $this from incompatible context in /home/mozcn/html/mediawiki-1.3.18/includes/Title.php on line 695
Notice: Only variable references should be returned by reference in /home/mozcn/html/mediawiki-1.3.18/includes/Namespace.php on line 138
Strict Standards: Non-static method Title::newFromText() should not be called statically, assuming $this from incompatible context in /home/mozcn/html/mediawiki-1.3.18/includes/Skin.php on line 1452
Strict Standards: Non-static method Namespace::getCanonicalIndex() should not be called statically, assuming $this from incompatible context in /home/mozcn/html/mediawiki-1.3.18/includes/Title.php on line 695
Notice: Only variable references should be returned by reference in /home/mozcn/html/mediawiki-1.3.18/includes/Namespace.php on line 138
Strict Standards: Only variables should be passed by reference in /home/mozcn/html/mediawiki-1.3.18/includes/Skin.php on line 1452
Strict Standards: Non-static method Namespace::isTalk() should not be called statically, assuming $this from incompatible context in /home/mozcn/html/mediawiki-1.3.18/includes/Skin.php on line 1367
Strict Standards: Non-static method Namespace::getTalk() should not be called statically, assuming $this from incompatible context in /home/mozcn/html/mediawiki-1.3.18/includes/Skin.php on line 1387
Strict Standards: Non-static method Namespace::isTalk() should not be called statically, assuming $this from incompatible context in /home/mozcn/html/mediawiki-1.3.18/includes/Namespace.php on line 99
Strict Standards: Non-static method Title::newFromText() should not be called statically, assuming $this from incompatible context in /home/mozcn/html/mediawiki-1.3.18/includes/Skin.php on line 1437
Strict Standards: Non-static method Namespace::getCanonicalIndex() should not be called statically, assuming $this from incompatible context in /home/mozcn/html/mediawiki-1.3.18/includes/Title.php on line 695
Strict Standards: Non-static method Title::newFromText() should not be called statically, assuming $this from incompatible context in /home/mozcn/html/mediawiki-1.3.18/includes/Skin.php on line 1439
Strict Standards: Non-static method Namespace::getCanonicalIndex() should not be called statically, assuming $this from incompatible context in /home/mozcn/html/mediawiki-1.3.18/includes/Title.php on line 695
Strict Standards: Only variables should be passed by reference in /home/mozcn/html/mediawiki-1.3.18/includes/Skin.php on line 1439
Strict Standards: Non-static method Namespace::getImage() should not be called statically, assuming $this from incompatible context in /home/mozcn/html/mediawiki-1.3.18/includes/Skin.php on line 1505
Strict Standards: Non-static method Title::newFromText() should not be called statically, assuming $this from incompatible context in /home/mozcn/html/mediawiki-1.3.18/includes/Skin.php on line 1450
Strict Standards: Non-static method Namespace::getCanonicalIndex() should not be called statically, assuming $this from incompatible context in /home/mozcn/html/mediawiki-1.3.18/includes/Title.php on line 695
Notice: Only variable references should be returned by reference in /home/mozcn/html/mediawiki-1.3.18/includes/Namespace.php on line 138
Strict Standards: Non-static method Title::newFromText() should not be called statically, assuming $this from incompatible context in /home/mozcn/html/mediawiki-1.3.18/includes/Skin.php on line 1452
Strict Standards: Non-static method Namespace::getCanonicalIndex() should not be called statically, assuming $this from incompatible context in /home/mozcn/html/mediawiki-1.3.18/includes/Title.php on line 695
Notice: Only variable references should be returned by reference in /home/mozcn/html/mediawiki-1.3.18/includes/Namespace.php on line 138
Strict Standards: Only variables should be passed by reference in /home/mozcn/html/mediawiki-1.3.18/includes/Skin.php on line 1452
Strict Standards: Non-static method Namespace::getSpecial() should not be called statically, assuming $this from incompatible context in /home/mozcn/html/mediawiki-1.3.18/languages/Language.php on line 1456
Strict Standards: Non-static method Title::newFromText() should not be called statically, assuming $this from incompatible context in /home/mozcn/html/mediawiki-1.3.18/includes/Skin.php on line 1450
Strict Standards: Non-static method Namespace::getCanonicalIndex() should not be called statically, assuming $this from incompatible context in /home/mozcn/html/mediawiki-1.3.18/includes/Title.php on line 695
Strict Standards: Non-static method Title::newFromText() should not be called statically, assuming $this from incompatible context in /home/mozcn/html/mediawiki-1.3.18/includes/Skin.php on line 1452
Strict Standards: Non-static method Namespace::getCanonicalIndex() should not be called statically, assuming $this from incompatible context in /home/mozcn/html/mediawiki-1.3.18/includes/Title.php on line 695
Strict Standards: Only variables should be passed by reference in /home/mozcn/html/mediawiki-1.3.18/includes/Skin.php on line 1452
Strict Standards: Non-static method Namespace::getSpecial() should not be called statically, assuming $this from incompatible context in /home/mozcn/html/mediawiki-1.3.18/languages/Language.php on line 1456
Strict Standards: Non-static method Title::newFromText() should not be called statically, assuming $this from incompatible context in /home/mozcn/html/mediawiki-1.3.18/includes/Skin.php on line 1450
Strict Standards: Non-static method Namespace::getCanonicalIndex() should not be called statically, assuming $this from incompatible context in /home/mozcn/html/mediawiki-1.3.18/includes/Title.php on line 695
Strict Standards: Non-static method Title::newFromText() should not be called statically, assuming $this from incompatible context in /home/mozcn/html/mediawiki-1.3.18/includes/Skin.php on line 1452
Strict Standards: Non-static method Namespace::getCanonicalIndex() should not be called statically, assuming $this from incompatible context in /home/mozcn/html/mediawiki-1.3.18/includes/Title.php on line 695
Strict Standards: Only variables should be passed by reference in /home/mozcn/html/mediawiki-1.3.18/includes/Skin.php on line 1452
Strict Standards: Non-static method Namespace::getUser() should not be called statically, assuming $this from incompatible context in /home/mozcn/html/mediawiki-1.3.18/includes/Skin.php on line 775
Strict Standards: Non-static method Namespace::getTalk() should not be called statically, assuming $this from incompatible context in /home/mozcn/html/mediawiki-1.3.18/includes/Skin.php on line 776
Strict Standards: Non-static method Namespace::getUser() should not be called statically, assuming $this from incompatible context in /home/mozcn/html/mediawiki-1.3.18/includes/Skin.php on line 776
Strict Standards: Non-static method Namespace::isTalk() should not be called statically, assuming $this from incompatible context in /home/mozcn/html/mediawiki-1.3.18/includes/Namespace.php on line 99
Strict Standards: Non-static method Title::newFromText() should not be called statically, assuming $this from incompatible context in /home/mozcn/html/mediawiki-1.3.18/includes/Skin.php on line 1450
Strict Standards: Non-static method Title::newFromText() should not be called statically, assuming $this from incompatible context in /home/mozcn/html/mediawiki-1.3.18/includes/Skin.php on line 1452
Strict Standards: Only variables should be passed by reference in /home/mozcn/html/mediawiki-1.3.18/includes/Skin.php on line 1452
Strict Standards: Non-static method Title::newFromText() should not be called statically, assuming $this from incompatible context in /home/mozcn/html/mediawiki-1.3.18/includes/Skin.php on line 1450
Strict Standards: Non-static method Namespace::getCanonicalIndex() should not be called statically, assuming $this from incompatible context in /home/mozcn/html/mediawiki-1.3.18/includes/Title.php on line 695
Notice: Only variable references should be returned by reference in /home/mozcn/html/mediawiki-1.3.18/includes/Namespace.php on line 138
Strict Standards: Non-static method Title::newFromText() should not be called statically, assuming $this from incompatible context in /home/mozcn/html/mediawiki-1.3.18/includes/Skin.php on line 1452
Strict Standards: Non-static method Namespace::getCanonicalIndex() should not be called statically, assuming $this from incompatible context in /home/mozcn/html/mediawiki-1.3.18/includes/Title.php on line 695
Notice: Only variable references should be returned by reference in /home/mozcn/html/mediawiki-1.3.18/includes/Namespace.php on line 138
Strict Standards: Only variables should be passed by reference in /home/mozcn/html/mediawiki-1.3.18/includes/Skin.php on line 1452
Strict Standards: Non-static method Namespace::getSpecial() should not be called statically, assuming $this from incompatible context in /home/mozcn/html/mediawiki-1.3.18/languages/Language.php on line 1456
Strict Standards: Non-static method Title::newFromText() should not be called statically, assuming $this from incompatible context in /home/mozcn/html/mediawiki-1.3.18/includes/Skin.php on line 1450
Strict Standards: Non-static method Namespace::getCanonicalIndex() should not be called statically, assuming $this from incompatible context in /home/mozcn/html/mediawiki-1.3.18/includes/Title.php on line 695
Strict Standards: Non-static method Title::newFromText() should not be called statically, assuming $this from incompatible context in /home/mozcn/html/mediawiki-1.3.18/includes/Skin.php on line 1452
Strict Standards: Non-static method Namespace::getCanonicalIndex() should not be called statically, assuming $this from incompatible context in /home/mozcn/html/mediawiki-1.3.18/includes/Title.php on line 695
Strict Standards: Only variables should be passed by reference in /home/mozcn/html/mediawiki-1.3.18/includes/Skin.php on line 1452
Strict Standards: Non-static method Title::makeTitle() should not be called statically, assuming $this from incompatible context in /home/mozcn/html/mediawiki-1.3.18/includes/Skin.php on line 718
Strict Standards: Non-static method Title::makeName() should not be called statically, assuming $this from incompatible context in /home/mozcn/html/mediawiki-1.3.18/includes/Title.php on line 138
Strict Standards: Non-static method Namespace::getCanonicalIndex() should not be called statically, assuming $this from incompatible context in /home/mozcn/html/mediawiki-1.3.18/includes/Title.php on line 695
Strict Standards: Only variables should be assigned by reference in /home/mozcn/html/mediawiki-1.3.18/includes/Skin.php on line 718
Strict Standards: Non-static method Title::newFromText() should not be called statically, assuming $this from incompatible context in /home/mozcn/html/mediawiki-1.3.18/includes/Skin.php on line 900
Strict Standards: Non-static method Title::newFromText() should not be called statically, assuming $this from incompatible context in /home/mozcn/html/mediawiki-1.3.18/includes/Skin.php on line 1450
Strict Standards: Non-static method Title::newFromText() should not be called statically, assuming $this from incompatible context in /home/mozcn/html/mediawiki-1.3.18/includes/Skin.php on line 1452
Strict Standards: Only variables should be passed by reference in /home/mozcn/html/mediawiki-1.3.18/includes/Skin.php on line 1452
Strict Standards: Non-static method Namespace::getSpecial() should not be called statically, assuming $this from incompatible context in /home/mozcn/html/mediawiki-1.3.18/languages/Language.php on line 1456
Strict Standards: Non-static method Title::newFromText() should not be called statically, assuming $this from incompatible context in /home/mozcn/html/mediawiki-1.3.18/includes/Skin.php on line 1450
Strict Standards: Non-static method Namespace::getCanonicalIndex() should not be called statically, assuming $this from incompatible context in /home/mozcn/html/mediawiki-1.3.18/includes/Title.php on line 695
Strict Standards: Non-static method Title::newFromText() should not be called statically, assuming $this from incompatible context in /home/mozcn/html/mediawiki-1.3.18/includes/Skin.php on line 1452
Strict Standards: Non-static method Namespace::getCanonicalIndex() should not be called statically, assuming $this from incompatible context in /home/mozcn/html/mediawiki-1.3.18/includes/Title.php on line 695
Strict Standards: Only variables should be passed by reference in /home/mozcn/html/mediawiki-1.3.18/includes/Skin.php on line 1452
Strict Standards: Non-static method Namespace::getSpecial() should not be called statically, assuming $this from incompatible context in /home/mozcn/html/mediawiki-1.3.18/languages/Language.php on line 1456
Strict Standards: Non-static method Title::newFromText() should not be called statically, assuming $this from incompatible context in /home/mozcn/html/mediawiki-1.3.18/includes/Skin.php on line 1450
Strict Standards: Non-static method Namespace::getCanonicalIndex() should not be called statically, assuming $this from incompatible context in /home/mozcn/html/mediawiki-1.3.18/includes/Title.php on line 695
Strict Standards: Non-static method Title::newFromText() should not be called statically, assuming $this from incompatible context in /home/mozcn/html/mediawiki-1.3.18/includes/Skin.php on line 1452
Strict Standards: Non-static method Namespace::getCanonicalIndex() should not be called statically, assuming $this from incompatible context in /home/mozcn/html/mediawiki-1.3.18/includes/Title.php on line 695
Strict Standards: Only variables should be passed by reference in /home/mozcn/html/mediawiki-1.3.18/includes/Skin.php on line 1452
Strict Standards: Non-static method Title::newFromText() should not be called statically, assuming $this from incompatible context in /home/mozcn/html/mediawiki-1.3.18/includes/Skin.php on line 1450
Strict Standards: Non-static method Title::newFromText() should not be called statically, assuming $this from incompatible context in /home/mozcn/html/mediawiki-1.3.18/includes/Skin.php on line 1452
Strict Standards: Only variables should be passed by reference in /home/mozcn/html/mediawiki-1.3.18/includes/Skin.php on line 1452
Strict Standards: Non-static method Namespace::getUser() should not be called statically, assuming $this from incompatible context in /home/mozcn/html/mediawiki-1.3.18/includes/Title.php on line 510
Strict Standards: Non-static method Title::newFromText() should not be called statically, assuming $this from incompatible context in /home/mozcn/html/mediawiki-1.3.18/includes/Skin.php on line 1450
Strict Standards: Non-static method Namespace::getCanonicalIndex() should not be called statically, assuming $this from incompatible context in /home/mozcn/html/mediawiki-1.3.18/includes/Title.php on line 695
Notice: Only variable references should be returned by reference in /home/mozcn/html/mediawiki-1.3.18/includes/Namespace.php on line 138
Strict Standards: Non-static method Title::newFromText() should not be called statically, assuming $this from incompatible context in /home/mozcn/html/mediawiki-1.3.18/includes/Skin.php on line 1452
Strict Standards: Non-static method Namespace::getCanonicalIndex() should not be called statically, assuming $this from incompatible context in /home/mozcn/html/mediawiki-1.3.18/includes/Title.php on line 695
Notice: Only variable references should be returned by reference in /home/mozcn/html/mediawiki-1.3.18/includes/Namespace.php on line 138
Strict Standards: Only variables should be passed by reference in /home/mozcn/html/mediawiki-1.3.18/includes/Skin.php on line 1452
Strict Standards: Non-static method Namespace::isTalk() should not be called statically, assuming $this from incompatible context in /home/mozcn/html/mediawiki-1.3.18/includes/Skin.php on line 1367
Strict Standards: Non-static method Namespace::getTalk() should not be called statically, assuming $this from incompatible context in /home/mozcn/html/mediawiki-1.3.18/includes/Skin.php on line 1387
Strict Standards: Non-static method Namespace::isTalk() should not be called statically, assuming $this from incompatible context in /home/mozcn/html/mediawiki-1.3.18/includes/Namespace.php on line 99
Strict Standards: Non-static method Title::newFromText() should not be called statically, assuming $this from incompatible context in /home/mozcn/html/mediawiki-1.3.18/includes/Skin.php on line 1437
Strict Standards: Non-static method Namespace::getCanonicalIndex() should not be called statically, assuming $this from incompatible context in /home/mozcn/html/mediawiki-1.3.18/includes/Title.php on line 695
Strict Standards: Non-static method Title::newFromText() should not be called statically, assuming $this from incompatible context in /home/mozcn/html/mediawiki-1.3.18/includes/Skin.php on line 1439
Strict Standards: Non-static method Namespace::getCanonicalIndex() should not be called statically, assuming $this from incompatible context in /home/mozcn/html/mediawiki-1.3.18/includes/Title.php on line 695
Strict Standards: Only variables should be passed by reference in /home/mozcn/html/mediawiki-1.3.18/includes/Skin.php on line 1439
Strict Standards: Non-static method Namespace::getImage() should not be called statically, assuming $this from incompatible context in /home/mozcn/html/mediawiki-1.3.18/includes/Skin.php on line 1505
Strict Standards: Non-static method Title::newFromText() should not be called statically, assuming $this from incompatible context in /home/mozcn/html/mediawiki-1.3.18/includes/Skin.php on line 1450
Strict Standards: Non-static method Namespace::getCanonicalIndex() should not be called statically, assuming $this from incompatible context in /home/mozcn/html/mediawiki-1.3.18/includes/Title.php on line 695
Notice: Only variable references should be returned by reference in /home/mozcn/html/mediawiki-1.3.18/includes/Namespace.php on line 138
Strict Standards: Non-static method Title::newFromText() should not be called statically, assuming $this from incompatible context in /home/mozcn/html/mediawiki-1.3.18/includes/Skin.php on line 1452
Strict Standards: Non-static method Namespace::getCanonicalIndex() should not be called statically, assuming $this from incompatible context in /home/mozcn/html/mediawiki-1.3.18/includes/Title.php on line 695
Notice: Only variable references should be returned by reference in /home/mozcn/html/mediawiki-1.3.18/includes/Namespace.php on line 138
Strict Standards: Only variables should be passed by reference in /home/mozcn/html/mediawiki-1.3.18/includes/Skin.php on line 1452
Strict Standards: Non-static method Namespace::getSpecial() should not be called statically, assuming $this from incompatible context in /home/mozcn/html/mediawiki-1.3.18/languages/Language.php on line 1456
Strict Standards: Non-static method Title::newFromText() should not be called statically, assuming $this from incompatible context in /home/mozcn/html/mediawiki-1.3.18/includes/Skin.php on line 1450
Strict Standards: Non-static method Namespace::getCanonicalIndex() should not be called statically, assuming $this from incompatible context in /home/mozcn/html/mediawiki-1.3.18/includes/Title.php on line 695
Strict Standards: Non-static method Title::newFromText() should not be called statically, assuming $this from incompatible context in /home/mozcn/html/mediawiki-1.3.18/includes/Skin.php on line 1452
Strict Standards: Non-static method Namespace::getCanonicalIndex() should not be called statically, assuming $this from incompatible context in /home/mozcn/html/mediawiki-1.3.18/includes/Title.php on line 695
Strict Standards: Only variables should be passed by reference in /home/mozcn/html/mediawiki-1.3.18/includes/Skin.php on line 1452
Strict Standards: Non-static method Namespace::getSpecial() should not be called statically, assuming $this from incompatible context in /home/mozcn/html/mediawiki-1.3.18/languages/Language.php on line 1456
Strict Standards: Non-static method Title::newFromText() should not be called statically, assuming $this from incompatible context in /home/mozcn/html/mediawiki-1.3.18/includes/Skin.php on line 1450
Strict Standards: Non-static method Namespace::getCanonicalIndex() should not be called statically, assuming $this from incompatible context in /home/mozcn/html/mediawiki-1.3.18/includes/Title.php on line 695
Strict Standards: Non-static method Title::newFromText() should not be called statically, assuming $this from incompatible context in /home/mozcn/html/mediawiki-1.3.18/includes/Skin.php on line 1452
Strict Standards: Non-static method Namespace::getCanonicalIndex() should not be called statically, assuming $this from incompatible context in /home/mozcn/html/mediawiki-1.3.18/includes/Title.php on line 695
Strict Standards: Only variables should be passed by reference in /home/mozcn/html/mediawiki-1.3.18/includes/Skin.php on line 1452
Strict Standards: Non-static method Namespace::getUser() should not be called statically, assuming $this from incompatible context in /home/mozcn/html/mediawiki-1.3.18/includes/Skin.php on line 1023
Strict Standards: Non-static method Namespace::getTalk() should not be called statically, assuming $this from incompatible context in /home/mozcn/html/mediawiki-1.3.18/includes/Skin.php on line 1024
Strict Standards: Non-static method Namespace::getUser() should not be called statically, assuming $this from incompatible context in /home/mozcn/html/mediawiki-1.3.18/includes/Skin.php on line 1024
Strict Standards: Non-static method Namespace::isTalk() should not be called statically, assuming $this from incompatible context in /home/mozcn/html/mediawiki-1.3.18/includes/Namespace.php on line 99
Strict Standards: Non-static method Namespace::getSpecial() should not be called statically, assuming $this from incompatible context in /home/mozcn/html/mediawiki-1.3.18/languages/Language.php on line 1456
Strict Standards: Non-static method Title::newFromText() should not be called statically, assuming $this from incompatible context in /home/mozcn/html/mediawiki-1.3.18/includes/Skin.php on line 1450
Strict Standards: Non-static method Namespace::getCanonicalIndex() should not be called statically, assuming $this from incompatible context in /home/mozcn/html/mediawiki-1.3.18/includes/Title.php on line 695
Strict Standards: Non-static method Title::newFromText() should not be called statically, assuming $this from incompatible context in /home/mozcn/html/mediawiki-1.3.18/includes/Skin.php on line 1452
Strict Standards: Non-static method Namespace::getCanonicalIndex() should not be called statically, assuming $this from incompatible context in /home/mozcn/html/mediawiki-1.3.18/includes/Title.php on line 695
Strict Standards: Only variables should be passed by reference in /home/mozcn/html/mediawiki-1.3.18/includes/Skin.php on line 1452
Strict Standards: Non-static method Title::newFromText() should not be called statically, assuming $this from incompatible context in /home/mozcn/html/mediawiki-1.3.18/includes/Skin.php on line 1450
Strict Standards: Non-static method Namespace::getCanonicalIndex() should not be called statically, assuming $this from incompatible context in /home/mozcn/html/mediawiki-1.3.18/includes/Title.php on line 695
Notice: Only variable references should be returned by reference in /home/mozcn/html/mediawiki-1.3.18/includes/Namespace.php on line 138
Strict Standards: Non-static method Title::newFromText() should not be called statically, assuming $this from incompatible context in /home/mozcn/html/mediawiki-1.3.18/includes/Skin.php on line 1452
Strict Standards: Non-static method Namespace::getCanonicalIndex() should not be called statically, assuming $this from incompatible context in /home/mozcn/html/mediawiki-1.3.18/includes/Title.php on line 695
Notice: Only variable references should be returned by reference in /home/mozcn/html/mediawiki-1.3.18/includes/Namespace.php on line 138
Strict Standards: Only variables should be passed by reference in /home/mozcn/html/mediawiki-1.3.18/includes/Skin.php on line 1452
![[首页]](/stylesheets/images/wiki.png)