Difference between revisions of "MediaWiki:Perseids-toolbar.js"
Jump to navigation
Jump to search
(Created page with "$( '.wikibase-toolbareditgroup-innoneditmode .wikibase-toolbar .wikibase-toolbarbutton' ) .after( $( '<a>' ) .attr( { 'class': 'wikibase-toolbarbutton', 'href': '#'...") |
|||
Line 12: | Line 12: | ||
} ) |
} ) |
||
); |
); |
||
− | |||
+ | |||
− | $( '.wikibase-toolbareditgroup-ineditmode .wikibase-toolbar .wikibase-toolbarbutton') |
||
− | .slice(-2,-1) |
||
− | .after( |
||
− | $( '<a>' ) |
||
− | .attr( { |
||
− | 'class': 'wikibase-toolbarbutton', |
||
− | 'href': '#' |
||
− | } ) |
||
− | .before( '|' ) |
||
− | .text( 'save to Perseids' ) |
||
− | .click( function ( event ) { |
||
− | /*event.preventDefault();*/ |
||
− | } ) |
||
− | ); |
||
− | |||
$( '.wb-claim-section .wb-addtoolbar .wb-editsection a.wikibase-toolbarbutton') |
$( '.wb-claim-section .wb-addtoolbar .wb-editsection a.wikibase-toolbarbutton') |
||
.after( |
.after( |
||
Line 41: | Line 26: | ||
} ) |
} ) |
||
); |
); |
||
+ | |||
+ | $( '.wikibase-toolbareditgroup .wikibase-toolbarbutton:not(.wikibase-toolbarbutton-disabled' ).click(function () { |
||
+ | $( '.wikibase-toolbareditgroup-ineditmode .wikibase-toolbar .wikibase-toolbarbutton') |
||
+ | .slice(-2,-1) |
||
+ | .after( |
||
+ | $( '<a>' ) |
||
+ | .attr( { |
||
+ | 'class': 'wikibase-toolbarbutton', |
||
+ | 'href': '#' |
||
+ | } ) |
||
+ | .before( '|' ) |
||
+ | .text( 'save to Perseids' ) |
||
+ | .click( function ( event ) { |
||
+ | /*event.preventDefault();*/ |
||
+ | } ) |
||
+ | ); |
||
+ | }); |
Revision as of 19:28, 28 July 2014
$( '.wikibase-toolbareditgroup-innoneditmode .wikibase-toolbar .wikibase-toolbarbutton' ) .after( $( '<a>' ) .attr( { 'class': 'wikibase-toolbarbutton', 'href': '#' } ) .before( '|' ) .text( 'edit in Perseids' ) .click( function ( event ) { /*event.preventDefault();*/ } ) ); $( '.wb-claim-section .wb-addtoolbar .wb-editsection a.wikibase-toolbarbutton') .after( $( '<a>' ) .attr( { 'class': 'wikibase-toolbarbutton', 'href': '#' } ) .before( '|' ) .text( 'add via Perseids' ) .click( function ( event ) { /*event.preventDefault();*/ } ) ); $( '.wikibase-toolbareditgroup .wikibase-toolbarbutton:not(.wikibase-toolbarbutton-disabled' ).click(function () { $( '.wikibase-toolbareditgroup-ineditmode .wikibase-toolbar .wikibase-toolbarbutton') .slice(-2,-1) .after( $( '<a>' ) .attr( { 'class': 'wikibase-toolbarbutton', 'href': '#' } ) .before( '|' ) .text( 'save to Perseids' ) .click( function ( event ) { /*event.preventDefault();*/ } ) ); });