diff options
Diffstat (limited to 'MLEB/CleanChanges/resources/cleanchanges.js')
-rw-r--r-- | MLEB/CleanChanges/resources/cleanchanges.js | 62 |
1 files changed, 0 insertions, 62 deletions
diff --git a/MLEB/CleanChanges/resources/cleanchanges.js b/MLEB/CleanChanges/resources/cleanchanges.js deleted file mode 100644 index 37389f3e..00000000 --- a/MLEB/CleanChanges/resources/cleanchanges.js +++ /dev/null @@ -1,62 +0,0 @@ -( function () { - 'use strict'; - - window.toggleVisibilityE = function ( levelId, otherId, linkId, type ) { - var thisLevel = document.getElementById( levelId ), - otherLevel = document.getElementById( otherId ), - linkLevel = document.getElementById( linkId ); - - if ( thisLevel.style.display === 'none' ) { - thisLevel.style.display = type; - otherLevel.style.display = 'none'; - linkLevel.style.display = 'inline'; - } else { - thisLevel.style.display = 'none'; - otherLevel.style.display = 'inline'; - linkLevel.style.display = 'none'; - } - }; - - window.showUserInfo = function ( sourceVar, targetId ) { - $( '#' + targetId ).html( mw.config.get( sourceVar ) ); - }; - - $( function () { - $( '.mw-cleanchanges-showuserinfo' ).each( function () { - var $this, id, target; - - $this = $( this ); - id = $this.data( 'mw-userinfo-id' ); - target = $this.data( 'mw-userinfo-target' ); - if ( id !== undefined ) { - $this.on( 'click keypress', function ( e ) { - if ( - e.type === 'click' || - e.type === 'keypress' && e.which === 13 - ) { - window.showUserInfo( 'wgUserInfo' + id, target ); - } - } ); - } - } ); - $( '.mw-cleanchanges-showblock' ).each( function () { - var $this, level, other, link; - - $this = $( this ); - level = $this.data( 'mw-cleanchanges-level' ); - other = $this.data( 'mw-cleanchanges-other' ); - link = $this.data( 'mw-cleanchanges-link' ); - if ( level !== undefined ) { - $this.on( 'click keypress', function ( e ) { - if ( - e.type === 'click' || - e.type === 'keypress' && e.which === 13 - ) { - window.toggleVisibilityE( level, other, link, 'block' ); - } - } ); - } - } ); - - } ); -}() ); |