Difference between revisions 40421 and 40422 on zhwikivoyage//<nowiki> // vim: set noet sts=0 sw=8: (function($){ /* (contracted; show full) if( latest.date > date ) { if( !confirm( "近1分钟内一个同样的 " + latest.type + " 模板已被发出。\n是否继续?" ) ) { pageobj.statelem.info( '用户取消' ); return; } } var dateHeaderRegex Result = new RegExp( "^==+\\s*" + date.getUTCFullYear() + "年" + (date.getUTCMonth() + 1) + "月" + "\\s*==+", 'mg' ).exec( text );; var dateHeaderRegexLast, dateHeaderRegexResult; while ((dateHeaderRegexLast = dateHeaderRegex.exec( text )) !== null) { dateHeaderRegexResult = dateHeaderRegexLast; } // If dateHeaderRegexResult is null then lastHeaderIndex is never checked. If it is not null but // \n== is not found, then the date header must be at the very start of the page. lastIndexOf // returns -1 in this case, so lastHeaderIndex gets set to 0 as desired. var lastHeaderIndex = text.lastIndexOf( "\n==" ) + 1; if( text.length > 0 ) { text += "\n\n"; (contracted; show full) wikipedia_page.setCallbackParameters( params ); wikipedia_page.setFollowRedirect( true ); wikipedia_page.load( Twinkle.warn.callbacks.main ); }; })(jQuery); //</nowiki> All content in the above text box is licensed under the Creative Commons Attribution-ShareAlike license Version 4 and was originally sourced from https://zh.wikivoyage.org/w/index.php?diff=prev&oldid=40422.
![]() ![]() This site is not affiliated with or endorsed in any way by the Wikimedia Foundation or any of its affiliates. In fact, we fucking despise them.
|