MediaWiki:TemplateNotice.js

Tbpedia>Sophivorus2023年6月10日 (六) 01:32的版本 (Created page with "→‎* * This script interacts with [[Template:Notice]] * [[Category:Template script pages]]:​ var TemplateNotice = { init: function () { $( '.template-notice-more' ).on( 'click', TemplateNotice.showAll ); }, showAll: function () { $moreButton = $( this ); $moreButton.hide(); $moreButton.prevAll().show(); } }; $( TemplateNotice.init );"
(差异) ←上一版本 | 最后版本 (差异) | 下一版本→ (差异)

注意:在发布之后,您可能需要清除浏览器缓存才能看到所作出的变更的影响。

  • Firefox或Safari:按住Shift的同时单击刷新,或按Ctrl-F5Ctrl-R(Mac为⌘-R
  • Google Chrome:Ctrl-Shift-R(Mac为⌘-Shift-R
  • Internet Explorer或Edge:按住Ctrl的同时单击刷新,或按Ctrl-F5
  • Opera:Ctrl-F5
/**
 * This script interacts with [[Template:Notice]]
 * [[Category:Template script pages]]
 */
var TemplateNotice = {

	init: function () {
		$( '.template-notice-more' ).on( 'click', TemplateNotice.showAll );
	},

	showAll: function () {
		$moreButton = $( this );
		$moreButton.hide();
		$moreButton.prevAll().show();
	}
};

$( TemplateNotice.init );