User:TheColdPot/global.js

/* const userInTop = document.createElement('div'); //$('body').append(userInTop); const $uit = $(userInTop); $uit.addClass('wds-dropdown').addClass('user-top-bar').html('');

const wiInTop = document.createElement('div'); const $wit = $(wiInTop); $wit.addClass('wds-dropdown').addClass('wikiop-top-bar').html(' Fandom  创建WIKI搜索探索</a></li></ul>  ');

$('nav>ul').append($wit);$('nav>ul').append($uit); /*const notifInTop = document.createElement('div'); const $nit = $(notifInTop); window.dn = false; $nit.addClass('wds-button').css({cursor: 'pointer'}).addClass('wds-is-secondary').on('click', function {	window.dn = !window.dn;	//if (window.dn) {		$('.notifications wds-dropdown.wds-is-not-hoverable.wds-open-to-right.is-attached-to-bottom .wds-dropdown__content').css({ display: window.dn ? 'flex' : 'none'});	//} }).html('<svg class="wds-icon wds-icon-small"><use xlink:href="#wds-icons-bell"> '); $('.wds-button.wds-is-secondary.wiki-tools__theme-switch').after($nit);*/

/* const userInBottom = document.createElement('div'); const $uib = $(userInBottom) $uib.css({top: '50px', right: '10px', position: 'fixed', width: '30px', height: '30px', borderRadius: '50px', /*display: 'flex', justifyContent: 'center', alignItems: 'center'});*/ /* $uib.html(' <div class="wds-dropdown__toggle"><svg class="wds-avatar__image" style="width:30px;height:30px;color:fff;background-color:var(--theme-accent-color)"><use xlink:href="#wds-icons-avatar"> <div class="wds-dropdown__content wds-is-not-scrollable wds-is-right-aligned"><ul class="wds-list wds-is-linked"><li id="global-navigation-user-signout"><form method="POST" action="https://www.fandom.com/logout"><input type="hidden" name="redirect" value="https://community.fandom.com/wiki/User:TheColdPot/global.js"><button type="submit" class="wds-sign-out__button" data-tracking-label="account.sign-out">退出  </li>参数设置</a></li>查看个人资料</a></li></ul>  '); $('#WikiaBarWrapper').append($uib);

$(function{	const url = new URL(location.href);	const paths = url.pathname.split(/\//g);	if (paths[1] === 'zh') {		$('.user__prefences').attr('href', '/zh/wiki/Special:Preferences');		$('.user__profile').attr('href', '/zh/wiki/Special:MyPage');	}	$('.user__prevent').on('click', function (e) { e.preventDefault; }) })*/