User:Proteins/disableeditbuttonontalkpage.js

// // Remove the "edit this page" button from a Talk page // // To use this script, add "importScript('User:Proteins/disableeditpageontalkpage.js');" to your monobook.js subpage // under your user page, as you can see at User:Proteins/monobook.js function disableEditButtonOnTalkPage {

var parent_node; var edit_button;

edit_button = document.getElementById('ca-edit'); if ((edit_button) && (edit_button.className == "istalk")) { parent_node = edit_button.parentNode; parent_node.removeChild(edit_button); }

} // closes function disableEditButtonOnTalkPage

addOnloadHook(function {            mw.util.addPortletLink('p-cactions', 'javascript:disableEditButtonOnTalkPage', '–edit', 'ca-noedit', 'Removes \"edit this page\" button', , ); }); //