User:Naohiro19/useralert.js

// This script is under public domain, and comes with ABSOLUTELY NO WARRANTY. // You can use/modify/redistribute without any permission.

// *** CUSTOMIZE SECTION var useralert_message = 'ATTENTION: This page is user page. Are you sure you want to edit?'; // ***

$(function { if(wgCanonicalNamespace != 'User') return;  if(!document.getElementById('editform')) return;  if(wgUserName == wgTitle.split('/')[0]) return;  var div = document.createElement('div');  div.setAttribute('class', 'usermessage');  div.setAttribute('style', 'display:block');  div.innerHTML = useralert_message;  var s = document.getElementById('contentSub');  s.parentNode.insertBefore(div, s.nextSibling); });