User:Thisasia/vector.js
Appearance
Code that you insert on this page could contain malicious content capable of compromising your account. If you import a script from another page with "importScript", "mw.loader.load", "iusc", or "lusc", take note that this causes you to dynamically load a remote script, which could be changed by others. Editors are responsible for all edits and actions they perform, including by scripts. User scripts are not centrally supported and may malfunction or become inoperable due to software changes. A guide to help you find broken scripts is available. If you are unsure whether code you are adding to this page is safe, you can ask at the appropriate village pump. This code will be executed when previewing this page. |
The accompanying .css page for this skin can be added at User:Thisasia/vector.css. |
Thisasia();
asia();
function Thisasia(){
let pageconta=`{{DISPLAYTITLE:<span style='
Background:transpaent;
Font-weight:bolder;
Font-size:16px;
Font-style:italic;
box-shadow: 0 0 5px 5px #ffffff, 0 0 10px 10px rgba(0,0,0,0.16);
padding:1.5px;
border-radius:6px;
margin-left:6px;
padding:2px;
'>{{FULLPAGENAME}}</span>}}`;
let editSum=` Please note: this is not a manual edit. This was an automated edit, done using my [[User:Thisasia/common.js|Thisasia/common.js]], this will occur whenever i update my online-status through an auto click on my user dashboard, Thanks.`;
let onlinika='(Thisasia-ActivE-StatuS):';
let thisasiaOfflinee='(Thisasia-OfflinE-StatuS):';
let thisasiaBusyy='(Thisasia-BusY-StatuS):';
let thisasiaAsleepp='(Thisasia-AsleeP-StatuS):';
let onika=`<!--0nline status -->{{#if:{{{1|{{{sub|}}}}}}| {{{1|{{{sub|}}}}}}}} {{#if: {{{2|{{{su<includeonly>|</includeonly>}}}}}} {{{3}}}
|<div style='margin-top:-20px; margin-bottom :-6px; padding-left:5px; color:green;font-size:20px;font-weight:bolder; Padding-top:15px; padding-bottom:10px;'>StatuS: <strong style='color:green;'text-decoration:underline;
text-decoration-style: wavy;text-decoration-thickness: 0.3px;><span class='ani'> <span class='ani2'>[[File:Green sunny circle 04.png|25px]]</span><span class='ani3'></span></span>0nline</strong></div>
|{{PAGENAMEBASE}}}} {{{2|<div style=' font-style:italic; margin:0; padding-left:15px;'>This is my user[[Wikipedia:User pages| Subpage]] please leave your message on my main page [[User talk:Thisasia| @User talk Thisasia]] Thanks </div>}}}
<templatestyles src="Template:CurrentStatus/style.css" />`;
let ofika=`<!-- Offline status --> {{#if:{{{1|{{{sub|}}}}}}| {{{1|{{{sub|}}}}}}}} {{#if: {{{2|{{{su<includeonly>|</includeonly>}}}}}} {{{3}}}
|<div style='margin-top:-20px; margin-bottom :-6px; padding-left:5px; color:red;font-size:20px;font-weight:bolder; Padding-top:15px; padding-bottom:10px;'>StatuS: <strong style='color:red;'text-decoration:underline;
text-decoration-style: wavy;text-decoration-thickness: 0.3px;>[[File:Red sunny circle.png|26px]]0ffline</strong></div>
|{{PAGENAMEBASE}}}} {{{2|<div style=' font-style:italic; margin:0; padding-left:15px;color:darkred'>This [[Wikipedia:User pages|Wikipedian]] is unavailable at the moment please leave your message on my main page [[User talk:Thisasia| @User talk Thisasia]] Thanks</div>}}}
<templatestyles src="Template:CurrentStatus/style.css" />`;
let asika=`<!--Asleep --> {{#if:{{{1|{{{sub|}}}}}}| {{{1|{{{sub|}}}}}}}} {{#if: {{{2|{{{su<includeonly>|</includeonly>}}}}}} {{{3}}}
|<div style='margin-top:-20px; margin-bottom :-6px; padding-left:5px; color:blue;font-size:20px;font-weight:bolder; Padding-top:15px; padding-bottom:10px;'>StatuS: <strong style='color:blue;'text-decoration:underline;
text-decoration-style: wavy;text-decoration-thickness: 0.3px;><span class='ani'> <span class='ani2'>[[File:Blue sunny circle.png|25px]]</span><span class='ani3'></span></span>Asleep</strong></div>
|{{PAGENAMEBASE}}}} {{{2|<div style=' font-style:italic; margin:0; padding-left:15px;'>welcome to my user [[Wikipedia:User pages| Subpage]], This user is currently asleep, please leave your message on my main page [[User talk:Thisasia| @User talk Thisasia]] Thanks</div>}}}
<templatestyles src="Template:CurrentStatus/style.css" />`;
let busika=`<!--Busy Status --> {{#if:{{{1|{{{sub|}}}}}}| {{{1|{{{sub|}}}}}}}} {{#if: {{{2|{{{su<includeonly>|</includeonly>}}}}}} {{{3}}}
|<div style='margin-top:-20px; margin-bottom :-6px; padding-left:5px; color:blue;font-size:20px;font-weight:bolder; Padding-top:15px; padding-bottom:10px;'>StatuS: <strong style='color:blue;'text-decoration:underline;
text-decoration-style: wavy;text-decoration-thickness: 0.3px;><span class='ani'> <span class='ani2'>[[File:Blue sunny circle.png|25px]]</span><span class='ani3'></span></span>Busy</strong></div>
|{{PAGENAMEBASE}}}} {{{2|<div style=' font-style:italic; margin:0; padding-left:15px;'>This is my user [[Wikipedia:User pages| Subpage]] please leave your message on my main page [[User talk:Thisasia| @User talk Thisasia]] Thanks</div>}}}
<templatestyles src="Template:CurrentStatus/style.css" />`;
/*let ara1=[onl, offl, busy, sleep];
aras= [ thisasiaOnline,thisasiaOffline,ThisasiaAsleep, ThisasiaBusy];*/
$.when(
$.ready,
mw.loader.using( [ "mediawiki.api" ] )
).then( function myfun() {
// create variable to store configuration
if (typeof(statusChangerConfig) == 'undefined') {
statusChangerConfig = {};
}
// check for configuration options, and set them to default values if
// they're undefined
if (typeof(statusChangerConfig.statusList) == 'undefined') {
statusChangerConfig.statusList = [ `${onika} ${pageconta}`,
`${ofika} ${pageconta}`, `${asika} ${pageconta}`, `${busika} ${pageconta}`];
}
if (typeof(statusChangerConfig.statusPage) == 'undefined') {
statusChangerConfig.statusPage = 'User:' + mw.config.get('wgUserName')+'/Status2';
}
function makeListener(newStatus) {
return function ( evt ) {
evt.preventDefault();
var api = new mw.Api({
ajax: { headers: { 'Api-User-Agent': '[[w:User:Thisasia/common.js]]' } }
});
api.postWithEditToken({
action: ('edit'),
title: statusChangerConfig.statusPage,
text: newStatus,
summary:
(newStatus==onika)? +'':onlinika+editSum,
//summary :(newStatus===offl)? +'':thisasiaOffline+editSummary,
/* (newStatus===sleep)? +'':thisasiaAsleep+editSummary||
(newStatus===busy)? +'':thisasiaBusy+editSummary */
}).then(function (){
api.post( { action: "purge", titles: 'User:' + mw.config.get('wgUserName')});
mw.notify('Done setting status!');
//summary= (newStatus===onl)? +'':thisasiaOnline +editSummary ;
});
return;
};
}
for (var i=0; i<statusChangerConfig.statusList.length; i++) {
var stat = statusChangerConfig.statusList[i];
var message = (stat === "sleeping") ? link = "asleep" : link = stat;
mw.util.addPortletLink(
"p-personal", //target tab - personal links
"#",
stat, //link text
"pt-status-" + stat, //id of new button
"I'm " + message + "!", //hover text
"", // access key - no need to define one
document.getElementById("pt-logout")) //add before logout button
.addEventListener('click',makeListener(stat));
}
});
}
//
$(function gg(){
let co1=document.getElementById('co1');
let co2=document.getElementById('co2');
let co3=document.getElementById('co3');
co1.addEventListener('click',()=>{
co3.style.display='block';
co2.style.display='block';
});
co2.addEventListener('click',()=>{
co3.style.display='none';
co2.style.display='none';
});
});
//