Stalls / VerseDeck

// ==UserScript==
// @name         VerseDeck
// @namespace    http://tampermonkey.net/
// @version      0.3b
// @description  Miiverse version of TweetDeck.
// @author       Stalls
// @match        https://miiverse.nintendo.net/*
// @grant        none
// ==/UserScript==

(function() {
    'use strict';

    //Variables
    var BlockAllAds = "off";
    var ShowAllSpoilers = "off";
    var ExtendCommentLimit = "on";
    var DisableBackwardsNotifs = "on";

    //Set functions
    function htmlReplace(a,b,element){
        if(!element)element=document.body;
        var nodes=element.childNodes;
        for(var n=0;n<nodes.length;n++) {
            if(nodes[n].nodeType==Node.TEXT_NODE) {
                nodes[n].textContent=nodes[n].textContent.replace(new RegExp(a,'gi'),b); }
            else{htmlReplace(a,b,nodes[n]);}}}
    var token = document.getElementsByTagName("body")[0].getAttribute("data-token");

    // VerseDeck Core
    $('.main-column').attr('style','columns:2;width:900px');


    //Activity Feed Page Style
    if(window.location.href.indexOf("/activity") > -1) {
        $('.main-column').attr('style','columns:1;width:610px;padding:7px 14px 4px'); }

    //Posts Page Style
    if(window.location.href.indexOf("/posts/*") > -1) {
        $('.main-column').attr('style','columns:1;width:400px'); }

    //User Page Style
    if(window.location.href.indexOf("/users/*") > -1) {
        $('.main-column').attr('style','columns:2;width:980px;height:900px;padding:7px 10px 4px'); }
    $('.user-sidebar').attr('style','margin: -16px 13px -75px 80px;columns:2;width:796px;padding-bottom: 100px;');


    //Notifications Page Style
    if(window.location.href.indexOf("/news/my_news") > -1) {
        $('.main-column').attr('style','columns:1;width:612px;padding:1px 14px 76px'); }

    //Profile Page Style
    if(window.location.href.indexOf("settings/profile") > -1) {
        $('.main-column').attr('style','columns:1;width:612px;padding:1px 14px 76px'); }

    //Block all ads
    if(BlockAllAds=="on") {
        $(".adx").remove(); }

    //Disable backwards notifications
    if(DisableBackwardsNotifs=="on")
        htmlReplace('‮','');
})();