SandBox: Difference between revisions

From fridemar.ai
Jump to navigation Jump to search
(Plain letters for linking, because some browsers have problems with supscripts)
No edit summary
Line 7: Line 7:
     </head>
     </head>
     <body>
     <body>
<a href="javascript:function ai()%7Bvar WikiMap=['http://google.com/search?q=%27,%27https://everipedia.org/wiki/%27,%27https://en.wikipedia.org/wiki/%27,%27https://twitter.com/search?q=%27,%27https://twitter.com/hashtag/%27],i,j,k,len,llen,link,linkpatt,linkText,linkTextArray=[],msg,myArray,node,txt,href,a,reg,span,lastLastIndex,textNodeXpath,textNodes;textNodeXpath=%27.//text()[not(ancestor::a)%20and%20not(ancestor::head)and%20not(ancestor::option)%20and%20not(ancestor::textarea)]%27;textNodes=document.evaluate(textNodeXpath,document,null,XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE,null);len=textNodes.snapshotLength;reg=/^\s+$/g;linkpatt=/\b(?:([a-z0-9%E4%F6%FC]*(?:[A-Z%C4%D6%DC_]|_)[a-z0-9%E4%F6%FC_]*){2,})\b/g;for(i=0;i%3Clen;i++){node=textNodes.snapshotItem(i);txt=node.nodeValue;txt=txt.replace(reg,%27%27);if(linkpatt.test(txt)){span=document.createElement(%27span%27);lastLastIndex=0;linkpatt.lastIndex=0;try{while(true){myArray=linkpatt.exec(txt);if(!myArray)break;link=myArray[0];linkTextArray=[link,20%E,%20%W,20%T,20%H];span.appendChild(document.createTextNode(txt.substring(lastLastIndex,myArray.index)));lastLastIndex=linkpatt.lastIndex;linkText=myArray[1];link=myArray[0];llen=link.length;if(link.substring(0,2)===%27%27&&link.substring(llen-2,llen)===%27%27){link=link.substring(2,llen-2);}for(j=0;j%3CMath.min(WikiMap.length,linkTextArray.length);j++){href=WikiMap[j]+link;a=document.createElement(%27a%27);a.setAttribute(%27href%27,href);a.appendChild(document.createTextNode(linkTextArray[j]));span.appendChild(a);}}span.appendChild(document.createTextNode(txt.substring(lastLastIndex)));node.parentNode.replaceChild(span,node);}catch(e){alert(e);}}}};ai()">WikiFyT1</a>
<a href="javascript:function ai()%7Bvar WikiMap=['http://google.com/search?q=%27,%27https://everipedia.org/wiki/%27,%27https://en.wikipedia.org/wiki/%27,%27https://twitter.com/search?q=%27,%27https://twitter.com/hashtag/%27],i,j,k,len,llen,link,linkpatt,linkText,linkTextArray=[],msg,myArray,node,txt,href,a,reg,span,lastLastIndex,textNodeXpath,textNodes;textNodeXpath=%27.//text()[not(ancestor::a)%20and%20not(ancestor::head)and%20not(ancestor::option)%20and%20not(ancestor::textarea)]%27;textNodes=document.evaluate(textNodeXpath,document,null,XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE,null);len=textNodes.snapshotLength;reg=/^\s+$/g;linkpatt=/\b(?:([a-z0-9%E4%F6%FC]*(?:[A-Z%C4%D6%DC_]|_)[a-z0-9%E4%F6%FC_]*){2,})\b/g;for(i=0;i%3Clen;i++){node=textNodes.snapshotItem(i);txt=node.nodeValue;txt=txt.replace(reg,%27%27);if(linkpatt.test(txt)){span=document.createElement(%27span%27);lastLastIndex=0;linkpatt.lastIndex=0;try{while(true){myArray=linkpatt.exec(txt);if(!myArray)break;link=myArray[0];linkTextArray=[link,20%'E',%20%'W',20%'T',20%H];span.appendChild(document.createTextNode(txt.substring(lastLastIndex,myArray.index)));lastLastIndex=linkpatt.lastIndex;linkText=myArray[1];link=myArray[0];llen=link.length;if(link.substring(0,2)===%27%27&&link.substring(llen-2,llen)===%27%27){link=link.substring(2,llen-2);}for(j=0;j%3CMath.min(WikiMap.length,linkTextArray.length);j++){href=WikiMap[j]+link;a=document.createElement(%27a%27);a.setAttribute(%27href%27,href);a.appendChild(document.createTextNode(linkTextArray[j]));span.appendChild(a);}}span.appendChild(document.createTextNode(txt.substring(lastLastIndex)));node.parentNode.replaceChild(span,node);}catch(e){alert(e);}}}};ai()">WikiFyT1</a>
     </body>
     </body>
</html>
</html>

Revision as of 19:07, 4 March 2018

This is a WikiPage, where users can test out features of a Wiki.

Each Wiki should have such a place for helping new users to test out Wiki features.

WikiFyT1