Skip to content

Instantly share code, notes, and snippets.

@Dzmuh
Last active October 24, 2024 03:00
Show Gist options
  • Save Dzmuh/088dd52e7aba446dd9d1059ca6f29a55 to your computer and use it in GitHub Desktop.
Save Dzmuh/088dd52e7aba446dd9d1059ca6f29a55 to your computer and use it in GitHub Desktop.
// ==UserScript==
// @name Zerkalo Cleaner
// @description Clear the zerkalo.io layout for easy print and save.
// @description:ru Очищает макет zerkalo.io для простой печати или сохранения.
// @namespace zerkalo.io
// @match https://news.zerkalo.io/*
// @require http://ajax.googleapis.com/ajax/libs/jquery/3.6.0/jquery.min.js
// @version 0.0.3
// @author Dzmuh
// @license MIT
// @icon https://www.google.com/s2/favicons?sz=64&domain=zerkalo.io
// @grant none
// ==/UserScript==
(function() {
'use strict';
var $ = window.jQuery;
$(document).ready( setTimeout( function(){
$('.m_header').append("<div class='clearIt' style='padding-left: 8px; padding-right: 8px;'><button type='button'> 🧹 </button></div>");
$('.clearIt').click( function() {
$('script').remove();
$('noscript').remove();
$('div.b-header').remove();
$('div.b-inform').remove();
$('div.b-nav').remove();
$('.b-sharelist').remove();
$('div.b-footer-i').remove();
$('div.b-addition.m-simplify').remove();
$('html, body').css({
'background-color' : 'white',
});
// ---
$('.clearIt').remove(); // self-destruct
});
}, 2000 ) ); // revive delay
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment