Advertisement
Guest User

blogbanscript for James

a guest
Jun 12th, 2012
94
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 5.11 KB | None | 0 0
  1. <script>
  2. var blogBanPrefs = { // Don't change this line.
  3. myBannedCommenters: [ // Don't change this line.
  4. /*******************************************************
  5. * Message to blog administrators:
  6. * Add Blogger profile IDs, commenter names, or commenter
  7. * URLs in the list below to control which comments get
  8. * erased in post pages when the blog loads. (This script
  9. * will not work in pop-up comment forms or full page
  10. * comment forms.)
  11. *
  12. * Blogger Profile IDs are usually 20-digit numbers.
  13. * Enter commenter names exactly as they appear in the
  14. * comment. Enter full URLs, including the http:// at
  15. * the beginning.
  16. *
  17. * Everything must be surrounded by single or double
  18. * quotation marks and be followed by a comma after
  19. * the closing quotation mark. If a name includes a
  20. * single quotation mark, surround the name with
  21. * double quotation marks, or vice versa. You can
  22. * also put a backslash, \, in front of quotation
  23. * marks in a commenter's name, \' or \", to safely
  24. * enter them between the quotations marks surrounding
  25. * the name of the banned commenter in your list.
  26. *
  27. * Anything on the same line after the double forward
  28. * slashes, //, is a comment for your benefit and
  29. * does not affect the script.
  30. *
  31. * Example Profile ID entry:
  32. * '00532888325841953106', // Bob
  33. *
  34. * Example Name entry:
  35. * 'Bob', // A spammer
  36. *
  37. * Example URL entry:
  38. * 'http://www.somewhere.com', // Bob's website
  39. *******************************************************/
  40. // Start entering banned commenters on next line.
  41.  
  42. '11439396562879158519' // James. Constant off-topic harassment, political spamming, and thread-derailing. Hated by everybody.
  43.  
  44.  
  45. 'TBTBTBTB'], // WARNING: Don't change this line.
  46. blockDM: // WARNING: Don't change this line.
  47. /*******************************************************
  48. * Message to blog administrators:
  49. * If you are experiencing problems with spam from David
  50. * Mabus, leave the following value set to true.
  51. *
  52. * If you do not want to automatically block spam
  53. * comments from David Mabus, change the value
  54. * from true to false.
  55. *******************************************************/
  56. false, // WARNING: Don't delete the comma.
  57.  
  58.  
  59.  
  60.  
  61. myCustomHTML: // Don't modify or delete this line.
  62. /*******************************************************
  63. * Message to blog administrators:
  64. * Enter a custom HTML message below between a pair of
  65. * double or single quotation marks (whichever kind of
  66. * quotation mark you use to surround the HTML, do not
  67. * use that kind of quotation mark in the HTML message
  68. * or the script will not work and give an error).
  69. *
  70. * Use the text __NAME__ as a stand-in for the banned
  71. * commenter's name in the HTML.
  72. *
  73. * If you do not enter anything, the default HTML entry
  74. * is as follows (it shows the banned person's name):
  75. * "<p><i>[__NAME__'s comment has been removed.]</i></p>"
  76. *
  77. * An example without the banned commenter name would be:
  78. * "<p><i>[Comment removed.]</i></p>"
  79. *******************************************************/
  80. // Enter your own HTML in the quotation marks below:
  81. "This post has been automatically hidden."
  82.  
  83.  
  84.  
  85. }; // WARNING: Don't modify or delete this line.
  86. // Don't delete the following lines either.
  87. </script>
  88. <script>
  89. (function(){var e;if(blogBanPrefs&&blogBanPrefs.blockDM){e=new Date;e.setMinutes(Math.floor(e.getMinutes()/15)*15,0,0);document.write("<script type='text/javascript' src='http://blogbanscript.googlecode.com/files/bbs.dm.js?rnd="+e.getTime()+"'><\/script>")}})();
  90. </script>
  91. <script>
  92. var blogBanScript=function(){var e,c,g,h,i,j,k,f=[],l="<p><i>[__NAME__'s comment has been removed.]</i></p>";e=document.getElementById("comments-block");h=function(){var a,b,d=/^[0-9]+$/;b=[];for(a=0;a<c.length;a++)if(d.test(c[a])){b.push(c[a]);c[a]=""}b.length>0&&f.push(RegExp("profile\\/(?:"+b.join("|")+")"))};i=function(){var a,b,d=/^http:\/\/[a-z0-9.]+$/i;b=[];for(a=0;a<c.length;a++)if(d.test(c[a])){b.push(c[a].replace(/\./g,"\\.").replace(/\//g,"\\/"));c[a]=""}b.length>0&&f.push(RegExp(b.join("|")))};
  93. j=function(){var a,b,d=/^.+$/i;b=[];for(a=0;a<c.length;a++)d.test(c[a])&&b.push(c[a].replace(/\./g,"\\.").replace(/\//g,"\\/'"));b.length>0&&f.push(RegExp('title="(?:'+b.join("|")+')"'))};g=function(){var a;c=[];if(blogBanPrefs){if(blogBanPrefs.blockDM&&blogBanDMList&&blogBanDMList.data){a=blogBanDMList.data;if(a[a.length-1]==="TBTBTBTB"||a[a.length-1]==="")a.pop();c=c.concat(a)}if(blogBanPrefs.myBannedCommenters){a=blogBanPrefs.myBannedCommenters;if(a[a.length-1]==="TBTBTBTB"||a[a.length-1]==="")a.pop();
  94. c=c.concat(a)}}};k=function(a){var b=a.getElementsByTagName("a");if(b.length<=1){b=a.getElementsByTagName("div");if(b.length!==0){for(b=b[b.length-1].nextSibling.nodeValue;b.search(/^\s/)!==-1;)b=b.slice(1);b=b.slice(0,-8)}else b="Someone"}else b=b[b.length-1].innerHTML;return b};return{run:function(){var a,b,d,m;if(e){if(blogBanPrefs.myCustomHTML!=="")l=blogBanPrefs.myCustomHTML;g();h();i();j();d=e.getElementsByTagName("dt");m=e.getElementsByTagName("dd");for(a=0;a<d.length;a++)for(b=0;b<f.length;b++)if(f[b].test(d[a].innerHTML)){b=
  95. l;if(/__NAME__/.test(b))b=b.replace(/__NAME__/,k(d[a]));d[a].innerHTML=b;m[a*2].innerHTML="";break}}}}}();blogBanScript.run();
  96. </script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement