// // D3xt3r.net Ad/Tracker-Block Blocker, can be modified and distributed. // But, please keep this notice either within the code, or // in a file contained with the code. // // By using this code, you agree that you understand, that D3xt3r.net and // the designer of this code, takes no responsibility for your use of it // and no liability for any damage caused by the use, distribution or // modification of it either. // // Original D3xt3r.net Ad/Tracker-Block Blocker by D3xt3r http://www.d3xt3r.net // --------------------------------------------------------------- This HOW TO, will show you how to request ad-block users, and tracker-block users to disable their add-ons to view your site. If they do not, the top viewing screen portion of your site will be blocked from view, with a notification of the reason, and how to view it correctly. This is not dependent on any specific type of ad. --------------------------------------------------------------- This is how it works:
1. Ad-block software, will stop the inclusion of the file advertisement.js into the document page. 2. Tracker-block software, will stop the inclusion of the file statcounter.com.js into the document page. 3. Both these .js files contain document.write scripts, adding CSS style parameters to HIDE the notification and display block. 4. If they have neither tracker block, nor ad-block, the .js files will be loaded, and the notification system hidden from view. 5. If they do have either of those add-ons, the add-ons will stop the inclusion, and the display blocks will be shown, asking the user to disable the software. 6. If they have javascript disabled, the blocks will automatically be hidden in case they are not tracker or ad-block users. --------------------------------------------------------------- Instructions:
1. Create the files: advertisement.js & statcounter.com.js 2. Place them in the root directory of your web server. 3. Place these codes into each file respectively. --------------------------------------------------------------- statcounter.com.js
Code: document.write(''); --------------------------------------------------------------- Now place this script anywhere in the page or pages, you wish to block ad-block, or tracker-block users:
Code:
Please Disable Tracker-Block To View This Website.
Please Disable Ad-Block To View This Website.
--------------------------------------------------------------- NOTE: This does not stop a user from seeing your source, or bottom portions of your site. But it inhibits most useful interactions. Also note: flash applications on the page may still display on top the positioned blocking table. --------------------------------------------------------------- Feel free to modify this coding.. I threw it together in a short period of time. I believe it more effective than any other ways I have seen. --------------------------------------------------------------- I personally use ad-block, and tracker-block, but I feel it the perogative for site owners to show this notification. And the users perogative to use ad-block and tracker-block.