Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // ==UserScript==
- // @name Carousel
- // @namespace iinfo
- // @include *root.cz*
- // @version 1
- // @grant none
- // @require http://code.jquery.com/jquery-2.1.0.min.js
- // ==/UserScript==
- (function() {
- /**
- * Add styles to head
- *
- * @param {String|Array} rules CSS rules
- */
- function css(rules) {
- rules = rules instanceof Array ? rules.join('\n') : rules;
- var head = document.head || document.getElementsByTagName('head')[0];
- var style = document.createElement('style');
- style.type = 'text/css';
- if (style.styleSheet)
- style.styleSheet.cssText = rules;
- else
- style.appendChild(document.createTextNode(rules));
- head.appendChild(style);
- }
- // Add styles
- css([
- '.hidden {',
- ' -webkit-transition: opacity 0.3s;',
- ' -moz-transition: opacity 0.3s;',
- ' -ms-transition: opacity 0.3s;',
- ' transition: opacity 0.3s;',
- ' opacity: 0.05;',
- '}',
- '.hidden:hover {',
- ' opacity: 1;',
- '}'
- ]);
- // Mark unwanted elements
- $(function() {
- // PR articles
- $('.article').each(function() {
- if ($('.admarker', this).length)
- $(this).addClass('hidden');
- });
- // Carousel
- $('#promo-footerPromo').addClass('hidden');
- });
- })();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement