Pengguna:Kenrick95/common.js: Perbedaan antara revisi
Konten dihapus Konten ditambahkan
kTidak ada ringkasan suntingan |
Tidak ada ringkasan suntingan |
||
Baris 112:
== CollapsibleTable ==*/
var autoCollapse = 2;
var collapseCaption = '
var expandCaption = '
window.collapseTable = function ( tableIndex ) {
Baris 194:
$( createCollapseButtons );
/**
▲/** Dynamic Navigation Bars (experimental) *************************************
*
*
*
*/
/
var NavigationBarHide = '[' + collapseCaption + ']';
var NavigationBarShow = '[' + expandCaption + ']';
/**
**/
window.toggleNavigationBar = function ( indexNavigationBar ) {
var NavToggle = document.getElementById("NavToggle" + indexNavigationBar);▼
var
if ( !NavFrame || !NavToggle ) {
return false;
}
/
if ( NavToggle.firstChild.data == NavigationBarHide ) {
for ( var NavChild = NavFrame.firstChild; NavChild != null; NavChild = NavChild.nextSibling ) {
if (
NavChild.style.display = 'none';
}
Baris 227:
NavToggle.firstChild.data = NavigationBarShow;
/
} else if ( NavToggle.firstChild.data == NavigationBarShow ) {
for ( var NavChild = NavFrame.firstChild; NavChild != null; NavChild = NavChild.nextSibling ) {
if (
NavChild.style.display = 'block';
}
Baris 238:
}
/
function createNavigationBarToggleButton() {
var indexNavigationBar = 0;
/
var divs = document.getElementsByTagName(
for ( var i = 0; NavFrame = divs[i]; i++ ) {
/
if (
indexNavigationBar++;
var NavToggle = document.createElement(
NavToggle.className = 'NavToggle';
NavToggle.setAttribute( 'id', 'NavToggle' + indexNavigationBar );
NavToggle.setAttribute( 'href', 'javascript:toggleNavigationBar(' + indexNavigationBar + ');' );
var isCollapsed =
/**
* Check if any children are already hidden. This loop is here for backwards compatibility:
* the old way of making NavFrames start out collapsed was to manually add style="display:none"
Baris 262 ⟶ 261:
* "collapsed" to the NavFrame itself, just like with collapsible tables.
*/
for ( var NavChild = NavFrame.firstChild; NavChild != null && !isCollapsed; NavChild = NavChild.nextSibling ) {
if (
if ( NavChild.style.display == 'none' ) {
isCollapsed = true;
Baris 269 ⟶ 268:
}
}
if ( isCollapsed ) {
for ( var NavChild = NavFrame.firstChild; NavChild != null; NavChild = NavChild.nextSibling ) {
if (
NavChild.style.display = 'none';
}
}
}
var NavToggleText = document.createTextNode( isCollapsed ? NavigationBarShow : NavigationBarHide );
NavToggle.appendChild( NavToggleText );
/
for( var j = 0; j < NavFrame.childNodes.length; j++ ) {
if (
NavToggle.style.color = NavFrame.childNodes[j].
NavFrame.childNodes[j].appendChild( NavToggle );
}
}
NavFrame.setAttribute( 'id', 'NavFrame' + indexNavigationBar );
}
}
}
/**
== Edittools ==
Baris 300:
//de.wiki-indonesia.club/wiki/MediaWiki:Onlyifediting.js and
//en.wiktionary.org/wiki/MediaWiki:Monobook.js
*/
function addCharSubsetMenu() {
var specialchars = document.getElementById('specialchars');
if (specialchars) {
var menu = "<select style=\"display:inline\" onChange=\"chooseCharSubset(selectedIndex)\">";
Baris 360 ⟶ 358:
}
}
/**
Baris 368 ⟶ 365:
[[Bantuan:Tabel|Tabel cantik]] */
var stripe = function()
{
Baris 426 ⟶ 422:
// Perform the striping.
hookEvent("load", stripe);
/**
== ExtraEditButtons ==
-> Tidak jalan untuk kulit Vector
*/
function addCustomEditButton( imageFile, speedTip, tagOpen, tagClose, sampleText ) {
var imagePath = '//upload.wikimedia.org/wikipedia/commons/';
Baris 514 ⟶ 509:
" ", "", "" );
}
/**
Baris 550 ⟶ 544:
=== Sunting bagian 0 ===
*/
function addPortletLink( PLplace, PLlink, PLtext, PLid, PLtitle) {
var PLtempplace="#"+PLplace;
var PLinside = '<a id="' + PLid + '" title="' + PLtitle + '" href="'+ PLlink +'"> ' + PLtext + '</div>';
$(PLtempplace).append();
▲ }
function addEdittopPortletLink() {
if(wgCanonicalNamespace == 'Special') return;
|