Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // ==UserScript==
- // @name BL Post Exposer
- // @namespace forums.nrvnqsr.com/
- // @version 0.2
- // @description Make post numbers visible without having to do extra clicking
- // @author NMR-3
- // @match forums.nrvnqsr.com/*
- // @grant none
- // @require https://ajax.googleapis.com/ajax/libs/jquery/2.1.4/jquery.min.js
- // ==/UserScript==
- window.onload = function(){
- var userinfolist = document.getElementsByClassName('userinfo');
- for(var i = 0; i < userinfolist.length; i++){
- addPostIDForEach(userinfolist[i]);
- }
- };
- function addPostIDForEach(item){
- var postid = item.parentElement.parentElement.id;
- postid = postid.slice(5);
- var dt = document.createElement("dt");
- dt.innerHTML = "Post ID";
- var dd = document.createElement("dd");
- dd.innerHTML = postid;
- var sub = item.getElementsByTagName("dl")[0];
- if(sub != null && sub != undefined){
- sub.appendChild(dt);
- sub.appendChild(dd);
- }
- else {
- item.appendChild(dd);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement