Content deleted Content added
test scrollTo |
add alerts for testing |
||
Line 85:
function annoHide() {
alert( "running annoHide");
// store status so it persists across page loads
localStorage.setItem("annostatus", "hide");
Line 101 ⟶ 103:
annoSwitch.parentNode.removeChild(annoSwitch);
}
alert( 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);
// make the menu item clickable by binding it to a click handler
Line 111 ⟶ 117:
annoShow();
} );
alert( y);
window.scrollTo(0, 2500);
Line 116 ⟶ 124:
function annoShow() {
alert( "running annoShow");
// store status so it persists across page loads
localStorage.setItem("annostatus", "show");
Line 132 ⟶ 142:
annoSwitch.parentNode.removeChild(annoSwitch);
}
alert( 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);
// make the menu item clickable by binding it to a click handler
Line 142 ⟶ 156:
annoHide();
} );
alert( y);
window.scrollTo(0, y);
|