Beefy Boxes and Bandwidth Generously Provided by pair Networks
Come for the quick hacks, stay for the epiphanies.
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??

After reading Author's level title hidden by default, and adding ".attribution-title { display: inline; }" to On-Site CSS Markup in Display Settings i realized i had no idea what the levels of those titles were. So, with a lot of searching and some guessing, i put together a Greasemonkey script to show (# - title), for example, instead of "(Pope)", it'll display "(28 - Pope)".

// ==UserScript== // @name Monk levels // @namespace http://www.example.com/chacham/ // @description Replace attribution title with corresponding level // @include http://perlmonks.org/* // @grant none // ==/UserScript== var level = { "Initiate" : "1", "Novice" : "2", "Acolyte" : "3", "Sexton" : "4", "Beadle" : "5", "Scribe" : "6", "Monk" : "7", "Pilgrim" : "8", "Friar" : "9", "Hermit" : "10", "Chaplain" : "11", "Deacon" : "12", "Curate" : "13", "Priest" : "14", "Vicar" : "15", "Parson" : "16", "Prior" : "17", "Monsignor" : "18", "Abbot" : "19", "Canon" : "20", "Chancellor" : "21", "Bishop" : "22", "Archbishop" : "23", "Cardinal" : "24", "Sage" : "25", "Saint" : "26", "Apostle" : "27", "Pope" : "28" }; var attribution = document.getElementsByClassName('attribution-title') +; for (var i = 0; i < attribution.length; i++) for (var title in level) attribution[i].innerHTML = attribution[i].innerHTML.replace(title, l +evel[title] + " - " + title);

Update: Changed innerHTML to textContent

Added on OpenUsersJS at PerlMonks Monk levels


In reply to Displaying Monk Levels by chacham

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others imbibing at the Monastery: (1)
As of 2024-04-25 01:35 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found