BMB Toolbar Insert

Inserts big mod buttons on toolbar pages

2014-08-13 या दिनांकाला. सर्वात नवीन आवृत्ती पाहा.

ही स्क्रिप्ट इंस्टॉल करण्यासाठी तुम्हाला Tampermonkey, Greasemonkey किंवा Violentmonkey यासारखे एक्स्टेंशन इंस्टॉल करावे लागेल.

You will need to install an extension such as Tampermonkey to install this script.

ही स्क्रिप्ट इंस्टॉल करण्यासाठी तुम्हाला Tampermonkey किंवा Violentmonkey यासारखे एक्स्टेंशन इंस्टॉल करावे लागेल..

You will need to install an extension such as Tampermonkey or Userscripts to install this script.

ही स्क्रिप्ट इंस्टॉल करण्यासाठी तुम्हाला Tampermonkey यासारखे एक्स्टेंशन इंस्टॉल करावे लागेल..

ही स्क्रिप्ट इंस्टॉल करण्यासाठी तुम्हाला एक युझर स्क्रिप्ट व्यवस्थापक एक्स्टेंशन इंस्टॉल करावे लागेल.

(माझ्याकडे आधीच युझर स्क्रिप्ट व्यवस्थापक आहे, मला इंस्टॉल करू द्या!)

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला Stylus सारखे एक्स्टेंशन इंस्टॉल करावे लागेल.

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला Stylus सारखे एक्स्टेंशन इंस्टॉल करावे लागेल.

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला Stylus सारखे एक्स्टेंशन इंस्टॉल करावे लागेल.

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला एक युझर स्टाईल व्यवस्थापक इंस्टॉल करावे लागेल.

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला एक युझर स्टाईल व्यवस्थापक इंस्टॉल करावे लागेल.

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला एक युझर स्टाईल व्यवस्थापक इंस्टॉल करावे लागेल.

(माझ्याकडे आधीच युझर स्टाईल व्यवस्थापक आहे, मला इंस्टॉल करू द्या!)

// ==UserScript==
// @author noeatnosleep
// @name BMB Toolbar Insert
// @version 1.0.0
// @namespace BMBTI
// @description Inserts big mod buttons on toolbar pages
// @include http://www.reddit.com/tb/*
// ==/UserScript==

function generateButtons () {
	$(document).find('div.left-side')[0].style.paddingTop='3px';
    var modButtons = document.createElement("span");
	modButtons.id = "modButtons";
	document.body.insertAfter(modButtons,document.body.appendChild);
	var subredditbar = document.getElementById('.comments.comments-button')[0].parentNode;
	modButtons.style.cssText="color:black;background-color:'#f0f0f0';border-bottom:1px black solid;font-family:verdana, arial, helvetica, sans-serif;font-size:90%;height:12px;padding:3px 0px 3px 6px;text-transform:uppercase;width:100%;z-index:+999999;position:fixed;top:0;";
	modButtons.style.backgroundColor='#f0f0f0';
	modButtons.style.paddingLeft = '3px';
    modButtons.style.paddingTop = '3px';
    modButtons.style.paddingBottom = '3px';
    modButtons.style.top='3px';
   	modButtons.innerHTML += "<a id='approvePost' style='color:black;' href='#'> APPROVE </a>";
	}

}

function insertAfter(modButtons,.comments.comments-button) {
    var parent = .comments.comments-button.parentNode;
    if(parent.lastchild == .comments.comments-button) {
        parent.appendChild(modButtons);
        } else {
        parent.insertBefore(modButtons, .comments.comments-button.nextSibling);
        }
}

function doStuff() {
    $('#approvePost').on('click',function(e){
    	goApprove();
    });
 
function goApprove() 
 
generateButtons(), doStuff(), goApprove();