Content deleted Content added
add alerts for testing |
differentiate the alert messages, so that I can tell them apart |
||
Line 85:
function annoHide() {
alert( "running annoHide. y starting value:" y);
// store status so it persists across page loads
Line 95:
y = window.scrollY;
alert( "y before removing menu item:" y);
// now we have to update the menu item
Line 104:
}
alert( "y before creating new menu item:" y);
// and then we create it (or its replacement) from scratch:
annoSwitch = mw.util.addPortletLink( 'p-tb', '#', 'Annotations \(show\)', 'ca-anno', 'Show the annotations', 'a' );
alert( "y before click handler:" y);
// make the menu item clickable by binding it to a click handler
Line 118:
} );
alert( "y after click handler/before window.scrollTo:" y);
window.scrollTo(0, 2500);
Line 124:
function annoShow() {
alert( "running annoShow. y starting value:" y);
// store status so it persists across page loads
Line 134:
y = window.scrollY;
alert( "y before removing menu item:" y);
// now we have to update the menu item
Line 143:
}
alert( "y before creating new menu item:" y);
// and then we create it (or its replacement) from scratch:
annoSwitch = mw.util.addPortletLink( 'p-tb', '#', 'Annotations \(hide\)', 'ca-anno', 'Hide the annotations', 'a' );
alert( "y before click handler:" y);
// make the menu item clickable by binding it to a click handler
Line 157:
} );
alert( "y after click handler/before window.scrollTo:" y);
window.scrollTo(0, y);
|