Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re: Lightweight interface to cast votes? (Free Nodelet Hack)

by LanX (Saint)
on Nov 04, 2017 at 15:59 UTC ( [id://1202750]=note: print w/replies, xml ) Need Help??


in reply to Lightweight interface to cast votes?

For a start:

Here a simplistic Free Nodelet hack which duplicates the vote-button next to all vote-radios.

Ugly but effective.

NB: This is still not solving the problem of unnecessary overhead by

  • traffic,
  • load-time
  • need to rebuild the page

Add the following to your Free Nodelet Settings

<script> //<!-- ( function (){ var button = document.getElementsByClassName('voteit')[0].firstChi +ld.firstChild; var votes = document.getElementsByClassName('reputation'); for ( i in votes ) { el= votes[i]; if ( el.id == "" ) { el.firstChild.appendChild( button.cloneNode() ) } } })() // --> </script>

Cheers Rolf
(addicted to the Perl Programming Language and ☆☆☆☆ :)
Je suis Charlie!

Replies are listed 'Best First'.
Re^2: Lightweight interface to cast votes? (Free Nodelet Hack)
by LanX (Saint) on Sep 24, 2020 at 10:19 UTC
    The DOM around the vote-radios and buttons changed recently, you'll need to update the JS to make it work again.

    <script> //<!-- ( function (){ var button = document.getElementsByClassName('voteit')[0].firstChi +ld; var votes = document.getElementsByClassName('reputation'); for ( i in votes ) { el= votes[i]; if ( el.id == "" ) { el.appendChild( button.cloneNode() ) } } })() // --> </script>

    This nodelet hack is very handy trying to vote on longer (sub)threads - especially when visiting with a mobile browser°. No need to scroll to the button now.

    Cheers Rolf
    (addicted to the Perl Programming Language :)
    Wikisyntax for the Monastery

    °) with a desktop browser you can still type RETURN to submit the form.

Re^2: Lightweight interface to cast votes? (Free Nodelet Hack)
by Anonymous Monk on Nov 04, 2017 at 18:42 UTC
    I think i posed a low overhead url

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1202750]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others wandering the Monastery: (2)
As of 2024-04-26 03:43 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found