Advertisement
Guest User

js - hide class

a guest
Dec 12th, 2018
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.87 KB | None | 0 0
  1. javascript:function ejectThis(){
  2. /* declaracion de otras funciones*/
  3. function changeIcons(){
  4. var link = document.querySelector("link[rel*='icon']") || document.createElement('link');
  5. link.type = 'image/x-icon';
  6. link.rel = 'shortcut icon';
  7. link.href = 'https://cdn.sstatic.net/Sites/stackoverflow/img/favicon.ico';
  8. document.getElementsByTagName('head')[0].appendChild(link);
  9. }
  10. /* ========================== */
  11. var asking = '',msg, tmp, value,css,head,estoseva,getStyleId,msj;
  12. var emojiss=['⛵','🗾','⬆️','♀'];
  13. value = ' {display:none;z-index: 0;}';
  14. css = '.adsbygoogle,#paPontonCore, #popads_topmost, .paPontonCore, .cNKqXxca, #cNKqXxcban';
  15. head = document.head || document.getElementsByTagName('head')[0];
  16. estoseva = document.getElementById("paPontonCore");
  17. getStyleId = document.getElementById("3");
  18. if(getStyleId != null){
  19. asking = prompt("Please enter css name");
  20. tmp = css;css='';
  21. if (asking != null) {
  22. var second;
  23. /* add CSS then ID*/
  24. if(asking.match(/\./)==null){ msg=1;second = ' ,.' + asking + ' ,#' + asking; }else{ second = ',' + asking + ',' + asking.replace('.','#'); }
  25. if(asking.match(/\#/)==null && msg==1){ second = ' ,.' + asking + ' ,#' + asking; }else{second = ' ,' + asking.replace('.','#') + ',' + asking.replace('#','.');}
  26. css = tmp + second + value;
  27. getStyleId.innerText = css;
  28. console.log(msg);
  29. }
  30. $(estoseva).hide(); $(estoseva).remove();
  31. }else{
  32. css = css + value;
  33. style = document.createElement('style');
  34. style.type = 'text/css';
  35. style.id='3';
  36. style.appendChild(document.createTextNode(css));
  37. $(estoseva).hide();
  38. $(estoseva).remove();
  39. $('div[id^="google_ads_iframe"],img[src^="http://imgur.com/"], img[src^="http://i67.tinypic.com/"], img[src^="http://images.dmca.com/"], img[src^="http://icons.iconarchive.com/"], #following-avatars, #E_cHVyZVBVNHVf').remove();
  40. head.appendChild(style);
  41. }
  42. changeIcons();
  43. };
  44. ejectThis();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement