By Yehuda B.
—
Last update
Nov 15, 2008
—
Installed
670 times.
// Israel Airports Authority
// version 0.1
// 2008-11-15
// Copyright (c) 2008, Yehuda B.
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
// http://www.gnu.org/licenses/gpl.html
//
// ==UserScript==
// @name Israel Airports Authority
// @namespace http://yehudab.com
// @description Fix display and navigation issues in Israel Airports Authority web site (mainly used for arriving and departing flights in Ben Gurion Airport). Version 0.1
// @include http://www.iaa.gov.il/*
// ==/UserScript==
function addGlobalStyle(css) {
var head, style;
head = document.getElementsByTagName('head')[0];
if (!head) { return; }
style = document.createElement('style');
style.type = 'text/css';
style.innerHTML = css;
head.appendChild(style);
}
var w = (typeof unsafeWindow == "undefined") ? window : unsafeWindow;
w.adjustDiv = function(){}
var table1 = document.getElementById("Table1");
if (table1)
{
table1.setAttribute("width", "");
table1.setAttribute("height", "");
}
var allA = document.getElementsByTagName("A");
if (allA != null)
{
var i, l = allA.length;
for (i = 0; i < l; i++)
{
if (allA[i].href.match(/%5C/))
{
allA[i].href = allA[i].href.replace(/%5C/g,"/");
}
if (allA[i].href.match(/OnlineFlights.aspx\?FlightsType=arr/i))
{
allA[i].href = allA[i].href.replace(/FlightsType=arr/i,"AorDFlight=A");
}
}
}
addGlobalStyle('.englishlink { white-space:nowrap; }');
addGlobalStyle('.toplinks { white-space:nowrap; }');