Skip to content

Instantly share code, notes, and snippets.

View holly4's full-sized avatar

Holly Green holly4

View GitHub Profile
@holly4
holly4 / show_livers
Created November 20, 2016 17:41
Run this code in your browser to display the avatars of who liked posts on livefyre.
$('head').append('<style> div.fyre span.fyre-comment-like-imgs { display: inline; } </style>');
@holly4
holly4 / restore_comment.js
Last active November 20, 2016 17:54
Restore deleted (and filterred) livefyre comments
var observer = new MutationObserver(function(mutations) {
mutations.forEach(function(mutation) {
// (this would restore the liker images but must then restore the
// comment footer too)
// mutation.removedNodes.forEach(function(entry) {
// if ($(entry).hasClass('fyre-comment-like-imgs')) {
// $(mutation.target).append(entry);
// }
//});
@holly4
holly4 / clean_posts.js
Last active November 24, 2016 06:19
Clean up the Fox News comment page
if (!window.jQuery) {
console.log('jQuery is not loaded!!! Try refreshing the page.');
} else {
// remove non-comment material
$('.alert').remove();
$('#sub').remove();
$('.article-info').remove();
$('.social-count').remove();
$('[data-widget-id]').remove();
$('#rail').remove();
@holly4
holly4 / control_scrolling.js
Last active July 4, 2016 06:25
Control Scrolling on Fox Forum
// handlers to store original methods
scrollToProper = window.scrollTo;
scrollByProper = window.scrollBy;
// is scrolling enabled?
scrollEnabled = true;
// override the scollTo and scrollBy functions
window.scrollTo = function (x, y) {
if (scrollEnabled)