MediaWiki:PinnedActivity.js

/*Simple Pinned Activity Module                     */ // -> Adds an extra column on the top for highlights //

var pins = window.pins || {} ;

// Plug: Actual pinning activity                    // function XPplug{ for (let ii; ii < pins.length; ++ii) { let pin = pins[ii]; if(!XPverify(pin,ii))continue; let nail = $('')[0]; let head = $(''+pin.title+'')[0]; let paper = document.createElement("li").appendChild(nail).appendChild(head); if(pin.description) paper.appendChild($(" ")[0]).appendTextNode(pin.description); let feed = $(".activityfeed")[0]; feed.insertBefore(paper,feed.firstChild); } }

function XPverify(pin,n){ let errMsg=[]; if (pin.link===null) errMsg.push(" Missing Link"); if (pin.title===null) errMsg.push(" Missing Title"); if (isNaN(pin.order)&&pin.order!==null) errMsg.push(" Order is not a number"); console.log("Error in pin #"+n+":"+errMsg); return errMsg.length===0; }

//$(func): Page check                               // $(function{   if(wgPagename == "Special:WikiaActivity")    XPplug; });

//change: Update check (Refresher Compatibility)    // $('#mw-content-text').change(XPplug);

/*draft

everything under this order link - name - description (opt)

check if these are correct if not then conslole log error