Skip to content

Instantly share code, notes, and snippets.

@romasan
Last active February 27, 2020 21:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save romasan/def2d2ba6568be8e734e6e53160f1ba6 to your computer and use it in GitHub Desktop.
Save romasan/def2d2ba6568be8e734e6e53160f1ba6 to your computer and use it in GitHub Desktop.
const f = () => {
let e = document.querySelector('.shadow');
e = e && e.previousSibling;
e = e && e.previousSibling;
e = e && e.innerText;
e = e && e.split(/[\s\{]/ig).filter(e => e).shift();
e = e && document.querySelector(e);
e && e.remove();
e = document.querySelector('[data-metrika="film_card"]');
e = e && e.nextElementSibling;
e && e.tagName !== 'TABLE' && e.remove();
e = document.querySelector('#editorials_block');
e = e && e.parentNode;
e && e.remove();
e = document.querySelector('.kinopoisk-header__feature-menu-container');
e && (e.innerHTML = '');
};
f();
setTimeout(f, 1e3);
setTimeout(f, 5e3);
setTimeout(f, 10e3);
const script = url => {
console.log('add script:', url);
const e = document.createElement('script');
e.src = url;
document.body.appendChild(e);
}
fetch('https://api.github.com/users/romasan/gists?per_page=1000', {
// credentials: 'include',
headers: {
// 'Content-Security-Policy': 'connect-src'
},
})
.then(resp => resp.json())
.then(data => data.find(e => e.files['kp-get.js']))
.then(item => item.files['kp-get.js'].raw_url)
.then(url => fetch(url))
.then(resp => resp.text())
.then(eval)
/**
* CSS
*
.movie-info__button-container, .social-teasers, #partial_component__footer, .userReview, .response, #FilmCriticismRandom, .editorial {
display: none!important;
}
.kinopoisk-header-image {
content: '';
}
.export-csv {
color: #00f;
cursor: pointer;
display: inline;
text-decoration: underline;
}
*/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment