Comment reader
How do I make an comment reader?
This uses a hidden iframe to read its comments!. What is a comment reader? How do you make a comment reader? This script and codes were developed by Asakasinsky on 27 December 2022, Tuesday.
Comment reader - Script Codes HTML Codes
<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>comment reader</title> <link rel="stylesheet" href="css/style.css">
</head>
<body> <div class="w"></div>
<h1>This pen reads its own comments!! (will not work in preview)</h1>
<h1>TRY IT! leave a comment!</h1> <script src='http://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js'></script> <script src="js/index.js"></script>
</body>
</html>
Comment reader - Script Codes CSS Codes
/**/
.w{ display:none;
}
h1{ font-size:3em; text-align:center;
}
comment,text,user{ display:inline-block;
}
comment{ margin:0.25em; width:5em; background:black; border-radius:1em; padding:1em; font-size:2em;
}
text{ color:white;
}
user{ background:white; border-radius:1em; font-size:0.5em; padding:0.5em;
}
r{ display:block; text-align:right;
}
Comment reader - Script Codes JS Codes
//
var xml = new XMLSerializer();
var url = "https://s.codepen.io/KyleDavidE/details/Iphfm";
function get(cb){ var frame = $('<iframe src="'+url+'" frameborder="0" http:=""></iframe>')[0] $('.w').html('').append(frame); frame = $('.w iframe')[0]; frame.contentWindow.onload = function(e){ $('iframe',frame.contentDocument).remove(); cb($(xml.serializeToString(frame.contentDocument).replace('script','was-a-scipt'))); }
}
function pc(el){ el = $(el); var out = {user:'username',text:'comment-text>p'} for(var i in out){ out[i] = $('.'+out[i],el).text(); } return out;
}
function getComments(cb){ get(function(doc){ var c = $('.block-comment-content',doc).get().map(pc); cb(c.reverse()); })
}
if(!location.href.match(/fullgrid/)){
getComments(function(e){ $(e.map(function(e){ return $("<comment><text>"+e.text+"</text><r><user>"+e.user+"</user></r></comment>")[0] })).appendTo($('body'));
})
}
Developer | Asakasinsky |
Username | asakasinsky |
Uploaded | December 27, 2022 |
Rating | 3 |
Size | 2,273 Kb |
Views | 6,072 |
Find the perfect freelance services for your business! Fiverr's mission is to change how the world works together. Fiverr connects businesses with freelancers offering digital services in 500+ categories. Find Developer!
Name | Size |
Seamless scroll animation | 2,083 Kb |
Generative Boids | 3,700 Kb |
Icon Fonts - SocialCount meets Style | 3,709 Kb |
Flipclock | 4,813 Kb |
Seconds counter | 4,153 Kb |
JQuery fallback for placeholder | 2,044 Kb |
Icon Fonts - emocons.js jQuery plugin | 3,214 Kb |
Tear-able Cloth | 3,768 Kb |
Odin-Ass-style jQuery | 2,093 Kb |
Bokeh Modal | 4,445 Kb |
Jasper is the AI Content Generator that helps you and your team break through creative blocks to create amazing, original content 10X faster. Discover all the ways the Jasper AI Content Platform can help streamline your creative workflows. Start For Free!
Name | Username | Size |
Blog | Rottingroom | 1,430 Kb |
Wrap_Test | Mscfourn | 7,503 Kb |
Simple blog concept | Drew_mc | 2,666 Kb |
SVG Basics | HipsterBrown | 1,852 Kb |
Simple Login Form | JoshBlackwood | 4,418 Kb |
Web Spiral - p5.js | TWAIN | 2,183 Kb |
Pure CSS albums gallery | Renaudtertrais | 2,978 Kb |
CSS Donut Charts | Seanstopnik | 2,908 Kb |
Multiple jCarousel | Pafnuty | 2,461 Kb |
Multicolumns 2 | Raphaelgoetter | 1,857 Kb |
Surf anonymously, prevent hackers from acquiring your IP address, send anonymous email, and encrypt your Internet connection. High speed, ultra secure, and easy to use. Instant setup. Hide Your IP Now!