/*
 -*- mode: javascript; coding: utf-8 -*-

 Copyright (c) 2009 ISHIKAWA Mutsumi <ishikawa@hanzubon.jp>
 This program is covered by the GNU General Public License 2
*/

function noreferrer(a){
    if (a.getAttribute('replaced') != 1) {
	a.setAttribute('replaced', 1);
	var url = a.href;
	var html = '<html><head><script type="text/javascript">'
		+ 'document.write(\'<meta http-equiv="refresh" content="0;url='+url+'">\');'
		+ '<'+'/script></head><body></body></html>';
	a.href = 'data:text/html;charset=utf-8,'+encodeURIComponent(html);
    }
}

function restore_original(a){
	a.href = a.getAttribute('o_href');
	a.setAttribute('replaced', 0);
}
