i patched my local copy, but forgot to hold vdradmin-am so it
didn't get upgraded....so it reappeared after the upgrade.

enclosed are two files.

1. a simple perl -pi script that gets rid of the javascript popups
from the template files.

2. a patch.gz file which can (unlike the diff listings i sent last time)
actually be fed into patch. i.e. the result of running the perl script
above.

craig

-- 
craig sanders <[EMAIL PROTECTED]>

Attachment: remove-javascript-popups.patch.gz
Description: Binary data

#!/usr/bin/perl -pi

# this script fixes vdradmin-am by transforming all the stupid
# javascript popups to plain href links so it works properly in a tabbed
# browser like iceweasel.

# to use:
#
# 1. save this script somewhere in the path (/usr/local/sbin, perhaps?) as
#    remove-javascript-popups.pl
#
# 2. cd /usr/share/vdradmin-am/template/
# 3. make a backup copy if you're paranoid: 'cp -af default default.orig'
# 4. egrep -Zli 'javascript:(popup|opener|void)' default/*.html default/*.js | xargs -0r remove-javascript-popups.pl
#
# 5. enjoy vdradmin-am without annoying popups.

# various .html files
s/<a href="javascript:popup\('<\?% ([a-z0-9.]+) %\?>'\)\s*;\s*\"/<a href="<?% $1 %?>"/i;

# prog_detail.html
s/<a href="javascript:void\(opener\.location\.href='<\?% recurl %\?>'\);window.close\(\)">/<a href="<?% recurl %?>">/i;

# timeline.js
s/anchor_start = '<a href="javascript:popup\('/anchor_start = '<a href="'/;
s/\+ "'.\/vdradmin.pl\?aktion=prog_detail\&amp;epg_id="/+ "vdradmin.pl?aktion=prog_detail\&amp;epg_id="/;
s/\+ event\.epg_id \+ "\&amp;vdr_id=" \+ vdr_id \+ "'\);" \+ '">';/+ event.epg_id + "\&amp;vdr_id=" + vdr_id + '">';/;

Reply via email to