User:Gloiremutaliko21/common.js

$(function confirmLogout { var $logoutLinks = $('#pt-logout>a');

if ($logoutLinks.length === 0 || !mw.config.get('wgUserName')) { return; }

$logoutLinks.on('click', function(event) {   event.preventDefault;

if (confirm('Stay loged in?')) { window.bldkDingExposedInterface(mw.message('logging-out-notify'), 'default', 'long'); new mw.Api.postWithEditToken({       action: 'logout'      }).then(function {        location.reload;      }); } }); });