additionals/assets/javascripts/redmine_tweaks_anonymize.js
2013-09-27 08:56:55 +02:00

27 lines
444 B
JavaScript

(function()
{
/**
* New window
*/
var handleNewWindow = function()
{
this.target = '_blank';
}
/**
* New window with anonymizer
*/
var handleAnon = function()
{
this.href = 'http://dontknow.me/at/?' + this.href;
}
// redmine uses jQuery so use it.
jQuery(document).ready(function()
{
jQuery('div.attachments a, a.external').each(handleNewWindow);
jQuery('a.external').each(handleAnon);
});
})();