User:Doork/wikia.js

// Leak if (wgNamespaceNumber === 1200) { $('', { id: 'LeakWarn', style: 'cursor:pointer;', }).html('Leak Warning') .prependTo('.toolbar .tools') .click(function { files = []; num = 1; do { var temp = prompt('Leaks'); if (!temp.trim) break; files.push(temp); num++; } while (num < 20); if (!files.length) return; title = prompt('title', files.length == 1 ? 'Leak' : 'Leaks'); $.nirvana.sendRequest({ controller: 'WallExternal', method: 'postNewMessage', type: 'POST', data: { body: 'Hello! You recently made a comment or uploaded a photo which contained leaks. Crewniverse asked us to keep this wiki free of leaks,so please don\'t do it again.Thanks a bunch!', pagetitle: wgPageName, messagetitle: title, token: mw.user.tokens.values.editToken }, callback: function { window.location.reload; }, onErrorCallback: function(e) { alert('An error occurred.'); } }); }); }

// Swear if (wgNamespaceNumber === 1200) { $('', { id: 'SwearWarn', style: 'cursor:pointer;', }).html('Swear Warning') .prependTo('.toolbar .tools') .click(function { files = []; num = 1; do { var temp = prompt('Swears'); if (!temp.trim) break; files.push(temp); num++; } while (num < 20); if (!files.length) return; title = prompt('title', files.length == 1 ? 'Leak' : 'Leaks'); $.nirvana.sendRequest({ controller: 'WallExternal', method: 'postNewMessage', type: 'POST', data: { body: 'Hello there! You recently sweared,and as this is not allowed on wiki,please stop it.Despite minor profanity swears are allowed,the one you used is not allowed.Please read our rules for more informations.', pagetitle: wgPageName, messagetitle: title, token: mw.user.tokens.values.editToken }, callback: function { window.location.reload; }, onErrorCallback: function(e) { alert('An error occurred.'); } }); }); }

// Speculations if (wgNamespaceNumber === 1200) { $('', { id: 'SwearWarn', style: 'cursor:pointer;', }).html('Speculation Warning') .prependTo('.toolbar .tools') .click(function { files = []; num = 1; do { var temp = prompt('Speculations'); if (!temp.trim) break; files.push(temp); num++; } while (num < 20); if (!files.length) return; title = prompt('title', files.length == 1 ? 'Leak' : 'Leaks'); $.nirvana.sendRequest({ controller: 'WallExternal', method: 'postNewMessage', type: 'POST', data: { body: 'Hello there! You recently added on an article a speculation. Please don\'t add anything fanon in this wikia. For theories,gemsona and fanon theories,you can go to our sister wiki.', pagetitle: wgPageName, messagetitle: title, token: mw.user.tokens.values.editToken }, callback: function { window.location.reload; }, onErrorCallback: function(e) { alert('An error occurred.'); } }); }); }