Added a fast and dirty script for weather.gov
This commit is contained in:
parent
3b208e1b12
commit
3ff24a2c35
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,55 @@
|
|||
// Weather.gov fixes
|
||||
// version 1.0
|
||||
// 2022-06-26
|
||||
// Copyright (c) 2021 Created by Georgios Sokianos
|
||||
// Released under the GPL license
|
||||
// http://www.gnu.org/copyleft/gpl.html
|
||||
//
|
||||
// ==UserScript==
|
||||
// @name Weather.gov fixes
|
||||
// @namespace none
|
||||
// @description Fixes css in GitHub
|
||||
// @include https://www.weather.gov/*
|
||||
// @version $VER: Weather.gov fixes 1.0 (26.06.2022)
|
||||
// @url https://ko-fi.com/walkero
|
||||
// ==/UserScript==
|
||||
|
||||
var head = document.head || document.getElementsByTagName('head')[0],
|
||||
obsscript = document.createElement('script');
|
||||
|
||||
|
||||
obsscript.type = 'text/javascript';
|
||||
obsscript.src = "file:///progdir:scripts/cust_lbw_obs.js";
|
||||
head.appendChild(obsscript);
|
||||
|
||||
|
||||
window.onload = function () {
|
||||
$(function() {
|
||||
var newARGS = window.location.search.toLowerCase().replace('?','');
|
||||
|
||||
if (newARGS) {
|
||||
var args = newARGS.split('&');
|
||||
var site = '';
|
||||
for (i = 0; i < args.length; i++) {
|
||||
var chunk = args[i].split('=');
|
||||
if (chunk[0]=='site') {
|
||||
if (1 < chunk[1].length && chunk[1].length < 6) {
|
||||
site = chunk[1];
|
||||
} else {
|
||||
popup();
|
||||
}
|
||||
} else {
|
||||
popup(site);
|
||||
}
|
||||
}
|
||||
if (site != '') {
|
||||
myMonitorOBS(site,24)
|
||||
} else {
|
||||
popup();
|
||||
}
|
||||
} else {
|
||||
popup();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
Loading…
Reference in New Issue