Advertisement
sp00n

MTB News Forum Fixer

Jun 30th, 2017
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. // ==UserScript==
  2. // @name        MTB News Forum Fixer
  3. // @namespace  
  4. // @include     http://www.mtb-news.de/forum/t/*
  5. // @include     https://www.mtb-news.de/forum/t/*
  6. // @version     1.4
  7. // @grant       none
  8. // ==/UserScript==
  9.  
  10. var string = document.body.innerHTML;
  11.  
  12.  
  13. // Fehlerhafte Umlaute korrigieren
  14. string = string.replace(/ü/g, 'ü');
  15. string = string.replace(/ü/g, 'ü');
  16. string = string.replace(/ä/g, 'ä');
  17. string = string.replace(/ö/g, 'ö');
  18. string = string.replace(/•/g, '-');
  19. string = string.replace(/–/g, '-');
  20. string = string.replace(/€/g, '€');
  21. string = string.replace(/ß/g, 'ß');
  22. string = string.replace(/„/g, '"');
  23. string = string.replace(/“/g, '"');
  24. string = string.replace(/Ü/g, 'Ü');
  25. string = string.replace(/Ö/g, 'Ö');
  26. string = string.replace(/Ä/g, 'Ä');
  27.  
  28.  
  29.  
  30. // Entferne ad.zanox.com aus den Links
  31. // http://ad.zanox.com/ppc/?30352176C2051769796&zpar0=[[f]]&ULP=[[http://www.chainreactioncycles.com/de/de/evoc-fr-tour-30l-2015/rp-prod131477?utm_source=Google&utm_medium=Shopping&utm_name=Switzerland&gclid=CjwKEAjwrpGuBRCkqeXpn-rt5hsSJAC9rxrPjbTdd8HZD2CaaA42Q_Q2JjWFor8yg5NLAgDJB-yvDRoCZzPw_wcB&gclsrc=aw.ds]]
  32. string = string.replace(/http:\/\/ad\.zanox\.com\/.+ULP=\[\[(.+)\]\]/g, '$1');
  33.  
  34.  
  35.  
  36. // Und der Tapatalk Unsinn
  37. string = string.replace(/(\<br\>\n)*Gesendet .+ Tapatalk.*/gi, '');
  38. string = string.replace(/(\<br\>\n)*Sent .+ Tapatalk.*/gi, '');
  39. string = string.replace(/(\<br\>\n)*Via Tapatalk.*/gi, '');
  40. string = string.replace(/(\<br\>\n)*\[.*tapatalk\].*/gi, '');
  41.  
  42.  
  43.  
  44. // Shimpanso... wtf
  45. string = string.replace(/Shimpanso/gi, 'Shimano');
  46. string = string.replace(/Schimpanso/gi, 'Shimano');
  47.  
  48.  
  49. document.body.innerHTML = string;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement