Added a fast and dirty script for weather.gov

This commit is contained in:
George Sokianos 2022-06-26 22:39:38 +01:00
parent 3b208e1b12
commit 3ff24a2c35
2 changed files with 1232 additions and 0 deletions

1177
cust_lbw_obs.js Normal file

File diff suppressed because it is too large Load Diff

55
weathergov.js Normal file
View File

@ -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();
}
});
}