Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re: Approval feedback (Gentle Feedback Free Nodelet Hack)

by Anonymous Monk
on Jan 10, 2012 at 09:46 UTC ( #947122=note: print w/replies, xml ) Need Help??


in reply to Approval feedback

Here is the start of the Gentle Feedback Free Nodelet Hack

Untested, but I'm pretty sure I got the magic strings right

<script language="javascript" type="text/javascript"> <!--// var TehGentleFeedback = function() { if( document.getElementById("Gentle-Feedback-Popup") !== null ){ /* single instance checker */ return; } String.prototype.escapeHTML = function(){ var result = ""; for(var i = 0; i < this.length; i++){ if(this.charAt(i) == "&" && this.length-i-1 >= 4 && this.substr(i, 4) != "&amp;"){ result = result + "&amp;"; } else if(this.charAt(i)== "<"){ result = result + "&lt;"; } else if(this.charAt(i)== ">"){ result = result + "&gt;"; } else { result = result + this.charAt(i); } } return result; }; var IQ = function IQ(msg){ msg = "/msg `[`author_title\``] " + msg; var ret = ''; ret += '<form method="post" action="?" enctype="multipart/form +-data">'; ret += '<input name="op" type="hidden" value="message">'; ret += '<input name="node_id" type="hidden" value="`id`">'; ret += '<input name="message" type="hidden" value="' + msg +'" +>'; ret += '<input type="submit" value="send">'; ret += msg.escapeHTML(); ret += '</form>' return ret; }; var SURVEY = function(){ return 'shabba' }; var p = document.createElement("p"); var ret = '<div id="Gentle-Feedback-Popup" style="padding: 1em 1em + 1em 1em; background:white;border:5px red dashed; position: fixed; le +ft:120px; top:20px; z-index:3; display: block; visibility: visible; w +idth:80%; " >'; ret += '<button style="width:100%" onclick="this.parentNode.parent +Node.parentNode.removeChild(this.parentNode.parentNode);">Close</butt +on><hr>'; ret += "<p>Gentle Feedback <p> Instant Quicky <p> "; ret += IQ("Regarding [`id`|`title\`], title ok, enough information + provided, formatting acceptable, nice job "); ret += IQ("Regarding [`id`|`title\`], blah blah blah"); ret += IQ("Hello"); ret += "<hr>" + SURVEY(); ret += '<hr> <button style="width:100%" onclick="this.parentNode.p +arentNode.parentNode.removeChild(this.parentNode.parentNode);">Close< +/button>'; ret += "</div>"; p.innerHTML = ret; document.body.appendChild(p); return; }; //--> </script> <a href='javascript:TehGentleFeedback()'>TehGentleFeedback()</a>

For the magic strings refer to

I ran out of steam for SURVEY , implement as you see fit

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (3)
As of 2019-05-20 04:26 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Do you enjoy 3D movies?



    Results (123 votes). Check out past polls.

    Notices?