The scenario is a lot of html files with a lot more of links between them. When I call the first one of them (it would be the index), the link pass several parameters throug
This will append a string to anything containing an href-attribute when being clicked:
window.addEventListener("click", function(e) {
var href = e.target.getAttribute("href");
if(href) {
location.href = href + "?q=stackoverflow";
e.preventDefault();
}
});
Example here: http://jsfiddle.net/E5Q7P/
Won't work in < IE9