Refresh a Google Adsense banner with Javascript

Often bloggers and site owners use galleries to have a greater number of pages, adding pages means adding clicks. Each photo is a click, is a pageview. When you click next and the whole page is refreshed, with new photo, new link and… new banner impression. This is the goal: increase banner impressions. Show more […]

Unobtrusive javascript to add an overlay banner

If you have to add an overlay to a site, here is a fast way to do it with an unobtrusive javascript. Add this file to your site, just before the closing body tag, and customize the overlay() function inside the js file. This code adds a div to cover your page with an opaque […]

New Facebook Invite all friends hack

So, you want to invote all your friends but the old hack doesn’t work anymore? With the last facebook friends groups restyle the code trick to send invitation to all friends do not work anymore. Moreover, you’ve installed the last Firefox, and you can’t use anymore the url address bar to input javascript commands. It […]

Get URL parameter in javascript

Sometimes in javascript you have the variable that you need to use in the url, as a parameter passed in GET to the page, but you don’t have it in page. You can retrieve those data analyzing the window.location.href string. Here is the Javascript function that does the work, pass to it the variable name […]

Get file name in javascript

How to get the file name of the page? When you need to read the file name of the current page in javascript you can use the document.location.href string and parse it to find the filename, here is the script that strips away the other chars and keep only the script file name: Another usefull […]