[B]The desired Javascript will have four uses:
– Set and get cookies– Block one or more IP numbers– Redirect users– Select one of two CSS codes– Disable right click
[B]Usage:
On load the site/blog will detect if javascript is off, if is off the user will get redirected to other page or site using :
<noscript><meta content=’0;url=
(Unless there is other way to do that)
[B]If java script is on:
[B]– Set and get cookies –
Check for a “bad” and “nice” user cookies
If cookie is “bad” user cookie = redirect to subdomain.domain.com/x/x/bad.html
If cookie is “nice” user cookie = next function of the javascript
If there is no cookie = set “nice” user cookie
[B]– Block one or more IP numbers –
Check the IP’s, if all is ok do nothing
If IP match = user get redirected to subdomain.domain.com/x/x/sorry.html
If IP match = set cookie ( “bad user cookie” )
From the previous steps of the javascript
If IP don’t match, check for banned user cookie
[B]– Select one of two CSS codes –
If cookie is “bad” user cookie = site/blog uses <style type=’text/css’>Some code here for bad users</style>
If cookie is “nice” user cookie = site/blog use <style type=’text/css’>Some code here for nice users</style>
~Optional : CSS style can be selected if IP’s match or not instead of cookies
[B]– Disable right click –
The disable right click will need to show an alert text message and one button.
If a user use the right button the message open, once the user click on the button (like a ok or confirmation button to close the message box) the script set the “bad user cookie” and close the message box
~Optional : If the user use the right click more than once, the user get redirected to a new page like subdomain.domain.com
~~~~~~~~~~~~~~~~~~~
[B]Note:[/B]
1- The script need to work in sites/blogs like:
domain.com
subdomain.domain.com
subdomain.domain.com/folder
subdomain.domain.com/folder/page.html
subdomain.domain.com/folder/folder2/you get the idea
2- Please include and diferentiate funtions on the script for better understanding if posible
3- Include your credits on the script ( website and or name ) / optional
4- The script will be used by a lot of users and will be distribuited for free on different sites and blogs so please if you don’t like links back let me know.
Sorry for my poor english