/***\n!ccTiddly config/marco\n!!!Disclaimer and warning\nThis tiddler is specially for ccTiddly. Please do not edit or save otherwise it may not work properly (unless you know what you are doing). If you happen to save it, and it didn't work, just delete the tiddler and the original config tiddler would reappear.\n***/\n\n/***\n!!!Changing the default options\n***/\n/*{{{*/\nconfig.options.chkHttpReadOnly = false; //make it HTTP writable by default\nconfig.options.chkSaveBackups = false; //disable save backup\nconfig.options.chkAutoSave = false; //disable autosave\n/*}}}*/\n\n/***\n!!!Put SiteTitle to webpage title\n***/\n/*{{{*/\n//window.title = convertUnicodeToUTF8((wikifyPlain("SiteTitle") + " - " + wikifyPlain("SiteSubtitle")).htmlEncode());\n/*}}}*/
\n/***\n!!!Option panel\nchange options panel to remove username\n***/\n//{{{\nconfig.shadowTiddlers.OptionsPanel ="<<option chkSaveBackups>> SaveBackups\sn<<option chkAutoSave>> AutoSave\sn<<option chkRegExpSearch>> RegExpSearch\sn<<option chkCaseSensitiveSearch>> CaseSensitiveSearch\sn<<option chkAnimate>> EnableAnimations\sn\snSee AdvancedOptions";\n//}}}\n\n/***\n!!!SideBarOption panel\nchange SideBarOption panel to add login panel\n***/\n//{{{\nconfig.shadowTiddlers.SideBarOptions="<<search>><<closeAll>><<permaview>><<newTiddler>><<newJournal 'DD MMM YYYY'>><<saveChanges>><<tiddler 'LoginPanel'>><<slider chkSliderOptionsPanel OptionsPanel 'options »' 'Change TiddlyWiki advanced options'>>";\n//}}}\n\n/***\n!!!Page template\n***/\n/*{{{*/\nconfig.shadowTiddlers.PageTemplate = "<div class='header' macro='gradient vert #18f #04b'>\sn<div class='headerShadow'>\sn<span class='siteTitle' refresh='content' tiddler='SiteTitle'></span> \sn<span class='siteSubtitle' refresh='content' tiddler='SiteSubtitle'></span>\sn</div>\sn<div class='headerForeground'>\sn<span class='siteTitle' refresh='content' tiddler='SiteTitle'></span> \sn<span class='siteSubtitle' refresh='content' tiddler='SiteSubtitle'></span>\sn</div>\sn</div>\sn<div id='mainMenu' refresh='content' tiddler='MainMenu'></div>\sn<div id='sidebar'>\sn<div id='sidebarOptions' refresh='content' tiddler='SideBarOptions'></div>\sn<div id='sidebarTabs' refresh='content' force='true' tiddler='SideBarTabs'></div>\sn<div id='sidebarCopyright' refresh='content' tiddler='Copyright'></div>\sn</div>\sn<div id='displayArea'>\sn<div id='messageArea'></div>\sn<div id='tiddlerDisplay'></div>\sn</div>";\n/*}}}*/
\n/***\n!!!Add password field to options\n***/\n/*{{{*/\n// time (in minutes, from now) for password to stay in cookie [0= default i.e. year 2038]\nconfig.macros.option.passwordTime = 0;\n//password variable\nconfig.options.pasSecretCode = "";\n/*}}}*/\n\n/***\n!!!Copyright panel\n***/\n/*{{{*/\nconfig.shadowTiddlers.Copyright = "powered by [[TiddlyWiki|http://www.tiddlywiki.com/]] ver. <<version>> and [[ccTiddly 0.5.5|http://cctiddly.sourceforge.net]]\sn[[stand alone|?standalone=1]]";\n/*}}}*/\n\n/***\n!!!Login panel\n***/\n//{{{\nconfig.shadowTiddlers.LoginPanel ="Username:\sn<<option txtUserName>>\snPassword:\sn<<option pasSecretCode>>\snWelcome annoymous\sn[[login|\~/wiki/index.php?]]";\n//}}}
\n/***\n!!!Add, save and load cookie\n***/\n/*{{{*/\nwindow.loadOptionsCookie = function()\n{\n var cookies = document.cookie.split(";");\n for(var c=0; c<cookies.length; c++)\n {\n var p = cookies[c].indexOf("=");\n if(p != -1)\n {\n var name = cookies[c].substr(0,p).trim();\n var value = cookies[c].substr(p+1).trim();\n switch(name.substr(0,3))\n {\n case "txt":\n config.options[name] = unescape(value);\n break;\n case "chk":\n config.options[name] = value == "true";\n break;\n case "pas":\n config.options[name] = unescape(value);\n break;\n }\n }\n }\n};\nwindow.saveOptionCookie = function(name)\n{\n var c = name + "=";\n var t = "; expires=Fri, 1 Jan 2038 12:00:00 UTC; path=/";\n\n switch(name.substr(0,3))\n {\n case "txt":\n c += escape(config.options[name].toString());\n break;\n case "chk":\n c += config.options[name] ? "true" : "false";\n break;\n case "pas":\n c += (escape(config.options[name].toString()));\nif( config.macros.option.passwordTime!=0 ) //if not using default time, calculate new time\n{\n var date = new Date();\n date.setTime(date.getTime()+config.macros.option.passwordTime*60000);\n t = "; expires="+date.toGMTString()+"; path=/";\n}\n break;\n }\n c += t;\n document.cookie = c;\n};\n/*}}}*/\n\n\n/***\n!!!Reload config file\nuncomment it to enable\nrequire variables defined by this time\n***/\n/*{{{*/\n//window.loadOptionsCookie();\n/*}}}*/
\n/***\n!Password field\nThese are use to create the password box under options. Please enable reload of option cookie at the bottom of this plugin if you would like it to display the md5 of your password.\n***/\n\n/***\n!!!Marco onChange and handler\n***/\n/*{{{*/\nconfig.macros.option.onChangeOption = function(e)\n{\n var opt = this.getAttribute("option");\n var elementType,valueField;\n if(opt)\n {\n switch(opt.substr(0,3))\n {\n case "txt":\n elementType = "input";\n valueField = "value";\n break;\n case "chk":\n elementType = "input";\n valueField = "checked";\n break;\n case "pas":\n elementType = "input";\n valueField = "value";\n break;\n }\nif( opt.substr(0,3) == "pas" )\n{\n config.options[opt] = hex_md5(this[valueField]);\n}else{\n config.options[opt] = this[valueField];\n}\n saveOptionCookie(opt);\n var nodes = document.getElementsByTagName(elementType);\n for(var t=0; t<nodes.length; t++)\n {\n var optNode = nodes[t].getAttribute("option");\n if(opt == optNode)\n nodes[t][valueField] = this[valueField];\n }\n }\n return(true);\n};\n\nconfig.macros.option.handler = function(place,macroName,params)\n{\n var opt = params[0];\n if(config.options[opt] == undefined)\n return;\n var c;\n switch(opt.substr(0,3))\n {\n case "txt":\n c = document.createElement("input");\n c.onkeyup = this.onChangeOption;\n c.setAttribute("option",opt);\n c.size = 15;\n place.appendChild(c);\n c.value = config.options[opt];\n break;\n case "chk":\n c = document.createElement("input");\n c.setAttribute("type","checkbox");\n c.onclick = this.onChangeOption;\n c.setAttribute("option",opt);\n place.appendChild(c);\n c.checked = config.options[opt];\n break;\n case "pas":\n c = document.createElement("input");\n c.setAttribute("type","password");\n c.onkeyup = this.onChangeOption;\n c.setAttribute("option",opt);\n c.size = 15;\n place.appendChild(c);\n c.value = config.options[opt];\n break;\n }\n};\n/*}}}*/\n
\n/***\n!! MD5 function\nobtained from http://pajhome.org.uk/crypt/md5\n***/\n//{{{\n//variable\nconfig.macros.option.passwordHexcase = 0; //hex output format. 0 - lowercase; 1 - uppercase\nconfig.macros.option.passwordChrsz = 8; //bits per input character. 8 - ASCII; 16 - Unicode\n\n//md5 function\nwindow.hex_md5 = function(s) { return binl2hex(core_md5(str2binl(s), s.length * config.macros.option.passwordChrsz));}\n\n//Calculate the MD5 of an array of little-endian words, and a bit length\nwindow.core_md5 = function (x, len)\n{\n /* append padding */\n x[len >> 5] |= 0x80 << ((len) % 32);\n x[(((len + 64) >>> 9) << 4) + 14] = len;\n\n var a = 1732584193;\n var b = -271733879;\n var c = -1732584194;\n var d = 271733878;\n\n for(var i = 0; i < x.length; i += 16)\n {\n var olda = a;\n var oldb = b;\n var oldc = c;\n var oldd = d;\n\n a = md5_ff(a, b, c, d, x[i+ 0], 7 , -680876936);\n d = md5_ff(d, a, b, c, x[i+ 1], 12, -389564586);\n c = md5_ff(c, d, a, b, x[i+ 2], 17, 606105819);\n b = md5_ff(b, c, d, a, x[i+ 3], 22, -1044525330);\n a = md5_ff(a, b, c, d, x[i+ 4], 7 , -176418897);\n d = md5_ff(d, a, b, c, x[i+ 5], 12, 1200080426);\n c = md5_ff(c, d, a, b, x[i+ 6], 17, -1473231341);\n b = md5_ff(b, c, d, a, x[i+ 7], 22, -45705983);\n a = md5_ff(a, b, c, d, x[i+ 8], 7 , 1770035416);\n d = md5_ff(d, a, b, c, x[i+ 9], 12, -1958414417);\n c = md5_ff(c, d, a, b, x[i+10], 17, -42063);\n b = md5_ff(b, c, d, a, x[i+11], 22, -1990404162);\n a = md5_ff(a, b, c, d, x[i+12], 7 , 1804603682);\n d = md5_ff(d, a, b, c, x[i+13], 12, -40341101);\n c = md5_ff(c, d, a, b, x[i+14], 17, -1502002290);\n b = md5_ff(b, c, d, a, x[i+15], 22, 1236535329);\n\n a = md5_gg(a, b, c, d, x[i+ 1], 5 , -165796510);\n d = md5_gg(d, a, b, c, x[i+ 6], 9 , -1069501632);\n c = md5_gg(c, d, a, b, x[i+11], 14, 643717713);\n b = md5_gg(b, c, d, a, x[i+ 0], 20, -373897302);\n a = md5_gg(a, b, c, d, x[i+ 5], 5 , -701558691);\n d = md5_gg(d, a, b, c, x[i+10], 9 , 38016083);\n c = md5_gg(c, d, a, b, x[i+15], 14, -660478335);\n b = md5_gg(b, c, d, a, x[i+ 4], 20, -405537848);\n a = md5_gg(a, b, c, d, x[i+ 9], 5 , 568446438);\n d = md5_gg(d, a, b, c, x[i+14], 9 , -1019803690);\n c = md5_gg(c, d, a, b, x[i+ 3], 14, -187363961);\n b = md5_gg(b, c, d, a, x[i+ 8], 20, 1163531501);\n a = md5_gg(a, b, c, d, x[i+13], 5 , -1444681467);\n d = md5_gg(d, a, b, c, x[i+ 2], 9 , -51403784);\n c = md5_gg(c, d, a, b, x[i+ 7], 14, 1735328473);\n b = md5_gg(b, c, d, a, x[i+12], 20, -1926607734);\n\n a = md5_hh(a, b, c, d, x[i+ 5], 4 , -378558);\n d = md5_hh(d, a, b, c, x[i+ 8], 11, -2022574463);\n c = md5_hh(c, d, a, b, x[i+11], 16, 1839030562);\n b = md5_hh(b, c, d, a, x[i+14], 23, -35309556);\n a = md5_hh(a, b, c, d, x[i+ 1], 4 , -1530992060);\n d = md5_hh(d, a, b, c, x[i+ 4], 11, 1272893353);\n c = md5_hh(c, d, a, b, x[i+ 7], 16, -155497632);\n b = md5_hh(b, c, d, a, x[i+10], 23, -1094730640);\n a = md5_hh(a, b, c, d, x[i+13], 4 , 681279174);\n d = md5_hh(d, a, b, c, x[i+ 0], 11, -358537222);\n c = md5_hh(c, d, a, b, x[i+ 3], 16, -722521979);\n b = md5_hh(b, c, d, a, x[i+ 6], 23, 76029189);\n a = md5_hh(a, b, c, d, x[i+ 9], 4 , -640364487);\n d = md5_hh(d, a, b, c, x[i+12], 11, -421815835);\n c = md5_hh(c, d, a, b, x[i+15], 16, 530742520);\n b = md5_hh(b, c, d, a, x[i+ 2], 23, -995338651);\n\n a = md5_ii(a, b, c, d, x[i+ 0], 6 , -198630844);\n d = md5_ii(d, a, b, c, x[i+ 7], 10, 1126891415);\n c = md5_ii(c, d, a, b, x[i+14], 15, -1416354905);\n b = md5_ii(b, c, d, a, x[i+ 5], 21, -57434055);\n a = md5_ii(a, b, c, d, x[i+12], 6 , 1700485571);\n d = md5_ii(d, a, b, c, x[i+ 3], 10, -1894986606);\n c = md5_ii(c, d, a, b, x[i+10], 15, -1051523);\n b = md5_ii(b, c, d, a, x[i+ 1], 21, -2054922799);\n a = md5_ii(a, b, c, d, x[i+ 8], 6 , 1873313359);\n d = md5_ii(d, a, b, c, x[i+15], 10, -30611744);\n c = md5_ii(c, d, a, b, x[i+ 6], 15, -1560198380);\n b = md5_ii(b, c, d, a, x[i+13], 21, 1309151649);\n a = md5_ii(a, b, c, d, x[i+ 4], 6 , -145523070);\n d = md5_ii(d, a, b, c, x[i+11], 10, -1120210379);\n c = md5_ii(c, d, a, b, x[i+ 2], 15, 718787259);\n b = md5_ii(b, c, d, a, x[i+ 9], 21, -343485551);\n\n a = safe_add(a, olda);\n b = safe_add(b, oldb);\n c = safe_add(c, oldc);\n d = safe_add(d, oldd);\n }\n return Array(a, b, c, d);\n\n}\n\n\n//These functions implement the four basic operations the algorithm uses.\nwindow.md5_cmn = function (q, a, b, x, s, t)\n{\n return safe_add(bit_rol(safe_add(safe_add(a, q), safe_add(x, t)), s),b);\n}\nwindow.md5_ff = function (a, b, c, d, x, s, t)\n{\n return md5_cmn((b & c) | ((~b) & d), a, b, x, s, t);\n}\nwindow.md5_gg = function (a, b, c, d, x, s, t)\n{\n return md5_cmn((b & d) | (c & (~d)), a, b, x, s, t);\n}\nwindow.md5_hh = function (a, b, c, d, x, s, t)\n{\n return md5_cmn(b ^ c ^ d, a, b, x, s, t);\n}\nwindow.md5_ii = function (a, b, c, d, x, s, t)\n{\n return md5_cmn(c ^ (b | (~d)), a, b, x, s, t);\n}\n\n//Add integers, wrapping at 2^32. This uses 16-bit operations internally\n//to work around bugs in some JS interpreters.\nwindow.safe_add = function (x, y)\n{\n var lsw = (x & 0xFFFF) + (y & 0xFFFF);\n var msw = (x >> 16) + (y >> 16) + (lsw >> 16);\n return (msw << 16) | (lsw & 0xFFFF);\n}\n\n//Bitwise rotate a 32-bit number to the left.\nwindow.bit_rol = function (num, cnt)\n{\n return (num << cnt) | (num >>> (32 - cnt));\n}\n\n\n//Convert a string to an array of little-endian words\n// If config.macros.option.passwordChrsz is ASCII, characters >255 have their hi-byte silently ignored.\nwindow.str2binl = function (str)\n{\n var bin = Array();\n var mask = (1 << config.macros.option.passwordChrsz) - 1;\n for(var i = 0; i < str.length * config.macros.option.passwordChrsz; i += config.macros.option.passwordChrsz)\n bin[i>>5] |= (str.charCodeAt(i / config.macros.option.passwordChrsz) & mask) << (i%32);\n return bin;\n}\n\n//Convert an array of little-endian words to a hex string.\nwindow.binl2hex = function (binarray)\n{\n var hex_tab = config.macros.option.passwordHexcase ? "0123456789ABCDEF" : "0123456789abcdef";\n var str = "";\n for(var i = 0; i < binarray.length * 4; i++)\n {\n str += hex_tab.charAt((binarray[i>>2] >> ((i%4)*8+4)) & 0xF) +\n hex_tab.charAt((binarray[i>>2] >> ((i%4)*8 )) & 0xF);\n }\n return str;\n}\n//}}}
\n/***\n!!!saveChanges\nused to generate RSS (and used as import in future version)\n***/\n/*{{{*/\nfunction saveChanges()\n{\n clearMessage();\n // Save Rss\n if(config.options.chkGenerateAnRssFeed)\n {\ndocument.forms.invisiForm.msg.value = "rss";\ndocument.forms.invisiForm.modifier.value = config.options.txtUserName;\ndocument.forms.invisiForm.body.value = generateRss();\ndocument.forms.invisiForm.submit();\ndisplayMessage("Rss generated and saved");\n }else{\n alert("This is only used for generating Rss. Changes were autosaved in ccTiddly");\n }\n}\n/*}}}*/
\n/***\n!!!saveTiddler\n***/\n//{{{\nTiddlyWiki.prototype.saveTiddler = function(title,newTitle,newBody,modifier,modified,tags)\n{\n var tiddler = this.fetchTiddler(title);\n var created;\n var omodified;\n if(tiddler)\n {\n created = tiddler.created; // preserve created date\nomodified = tiddler.modified; // get original modified date\n this.deleteTiddler(title);\n }\n else\n {\n tiddler = new Tiddler();\n created = modified;\n omodified = modified;\n }\n tiddler.set(newTitle,newBody,modifier,modified,tags,created);\n this.addTiddler(tiddler);\n if(title != newTitle)\n this.notify(title,true);\n this.notify(newTitle,true);\ndocument.forms.invisiForm.msg.value = "save";\ndocument.forms.invisiForm.oldtitle.value = title;\ndocument.forms.invisiForm.title.value = newTitle;\ndocument.forms.invisiForm.body.value = newBody;\ndocument.forms.invisiForm.modifier.value = modifier;\ndocument.forms.invisiForm.omodified.value = omodified.convertToYYYYMMDDHHMM();\ndocument.forms.invisiForm.modified.value = modified.convertToYYYYMMDDHHMM();\ndocument.forms.invisiForm.tags.value = tags;\ndocument.forms.invisiForm.submit();\n return tiddler;\n}\n//}}}
\n/***\n!!!removeTiddler\n***/\n//{{{\nTiddlyWiki.prototype.removeTiddler = function(title)\n{\n var tiddler = this.fetchTiddler(title);\n if(tiddler)\n {\n this.deleteTiddler(title);\n this.notify(title,true);\ndocument.forms.invisiForm.msg.value = "delete";\ndocument.forms.invisiForm.title.value = title;\ndocument.forms.invisiForm.modifier.value = config.options.txtUserName;\ndocument.forms.invisiForm.submit();\n }\n}\n//}}}
\n/***\n!!!createExternalLink\nusing ~ before link would override open in new window\n***/\n/*{{{*/\nwindow.createExternalLink=function (place,url)\n{\n var theLink = document.createElement("a");\n theLink.className = "externalLink";\nif( url.substring(0,1) == "\s~" )\n{\nurl = url.substring(1,url.length);\n theLink.href = url;\n theLink.title = config.messages.externalLinkTooltip.format([url]);\n place.appendChild(theLink);\n return(theLink);\n}\n theLink.href = url;\n theLink.title = config.messages.externalLinkTooltip.format([url]);\n if(config.options.chkOpenInNewWindow)\n theLink.target = "_blank";\n place.appendChild(theLink);\n return(theLink);\n}\n/*}}}*/
rwer
sfasfs
网络记事本
<html>\n<form method="get" action="http://www.iciba.com/search"\ntarget="_blank">\n<b>金山词霸</b>\n<input name="s" id="s" type="text" size="21" style="height:18px;"\naccesskey="c" title="查词热键:alt+c" /> <input type="submit"\nvalue="搜 索" style="padding:3px 5px 0 5px;margin:0 0 0\n10px;font-weight:bold" /></form>\n</html>\n<html><form method="post" target="_blank"\naction="http://dict.cn/search/">\n<b>Dict线上字典</b>\n<input maxlength=256 size=21 name=q>\n<input type="submit" value="Look Up">\n</form>\n</html>
<html><form method="post" target="_blank"\naction="http://dict.cn/search/">\n<b>Dict线上字典</b>\n<input maxlength=256 size=21 name=q>\n<input type="submit" value="Look Up">\n</form>\n</html>
<html><form method="post" target="_blank"\naction="http://dict.cn/search/">\n<b>Dict线上字典</b>\n<input maxlength=256 size=21 name=q>\n<input type="submit" value="Look Up">\n</form>\n</html>
使用此 TiddlyWiki 的空白范本之前,请先修改以下默认文章::\n* SiteTitle 及 SiteSubtitle:网站的标题和副标题,显示于页面上方(在保存变更后,将显示于浏览器视窗的标题列)。\n* MainMenu:主菜单(通常在页面左测)。\n* DefaultTiddlers:包含一些文章的标题,可于进入TiddlyWiki 后开启。\n请输入您的大名,作为所建立/ 编辑文章的署名:<<option txtUserName>>
sfsdfgsdfds