Advertisement
Guest User

Untitled

a guest
Aug 19th, 2014
281
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. // ==UserScript==
  2. // @name        envato
  3. // @namespace   envato
  4. // @include     http://codecanyon.net/*
  5. // @include     http://themeforest.net/*
  6. // @include     http://videohive.net/*
  7. // @include     http://audiojungle.net/*
  8. // @include     http://photodune.net/*
  9. // @include     http://graphicriver.net/*
  10. // @include     http://activeden.net/*
  11. // @include     http://3docean.net/*
  12. // @version     1.1
  13. // @grant       none
  14. // ==/UserScript==
  15.  
  16. jQuery(document).ready(function() {
  17.    
  18.     jQuery('<style />').html(
  19.    
  20.         '.cj {background-color: #333 !important}' +
  21.         '.cj-2 {background-color: #999 !important;}' +
  22.         '.cj h2 {color: #FFF}' +
  23.         '.cj p {color: #CCC}' +
  24.         '.cj img {border: 1px solid white}' +
  25.         '.marketing-ad {border: 1px solid #DDD}' +
  26.         '.home-section__announcement {margin-bottom: 25px}' +
  27.         '.-color-white:last-child {padding-top: 25px}'
  28.    
  29.     ).appendTo(jQuery('head'));
  30.    
  31.     var followed = jQuery('#followed-items').addClass('cj'),
  32.     whites = jQuery('.-color-white'),
  33.     greys = jQuery('.-color-grey');
  34.    
  35.     if(followed.length) {
  36.  
  37.         whites.eq(1).addClass('cj').insertAfter(jQuery('#content').children('div').children('div').eq(0)).find('h2').text('New Stuff');
  38.         whites.eq(whites.length - 2).addClass('cj');
  39.        
  40.     }
  41.     else {
  42.        
  43.         whites.eq(0).addClass('cj').insertAfter(jQuery('#content').children('div').children('div').eq(0)).find('h2').text('New Stuff');
  44.         whites.eq(whites.length - 1).addClass('cj-2');
  45.         greys.eq(greys.length - 1).addClass('cj');
  46.        
  47.     }
  48.    
  49.     // Alternative titles
  50.     greys.eq(0).find('h2').text('Staff Picks');
  51.     greys.eq(1).find('h2').text('Free Stuff');
  52.     followed.find('h2').text('Authors you Follow');
  53.    
  54. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement