PageSourceSearch

https://www.radomes.org/museum/javascripts/AFRMAmisc.js

js radomes.org collected 2026-09-24 19:23:24 UTC 6,484 bytes, 131 lines download raw bytes

1var wxapikey="3564f8e452684b859c6195904161409";
2var googleapikey="AIzaSyCOaFEdFrK9BAlALR2qUCHTTH1aCxtEhZk";
3var popup = null;
4
5(function($) {
6$(function() {
7    //Navbar code
8	$("#topnav li").prepend("<span></span>"); //Throws an empty span tag right before the a tag
9
10	$("#topnav li").each(function() { //For each list item...
11		var linkText = $(this).find("a").html(); //Find the text inside of the a tag
12		$(this).find("span").show().html(linkText); //Add the text in the span tag
13	});
14
15	$("#topnav li").hover(function() {	//On hover...
16		$(this).find("span").stop().animate({
17			marginTop: "-40" //Find the span tag and move it up 40 pixels
18		}, 250);
19	} , function() { //On hover out...
20		$(this).find("span").stop().animate({
21			marginTop: "0" //Move the span back to its original state (0px)
22		}, 250);
23	});
24   // end of Navbar code
25});
26//$("#copy-button").zclip({
27//    path: "js/ZeroClipboard.swf",
28//    copy: function(){
29//	return $(this).prev().val();
30//	}
31//});
32
33    $(function() {
34        $('.cap').blur(function() { // force capitalized words
35            this.value=ucwords(this.value);
36        });
37        $('.up').blur(function() { // force uppercase
38            this.value=this.value.toUpperCase();
39        });
40        $('.low').blur(function() { //force lower case
41            this.value=this.value.toLowerCase();
42        });
43        $('.phone').blur(function() { 
44            this.value=toPhone(this.value);
45        });
46    });
47
48})(jQuery);
49
50(function(a){a.easyconfirm={};a.easyconfirm.locales={};a.easyconfirm.locales.enUS={title:"Are you sure?",text:"Are you sure that you want to perform this action?",button:["Cancel","OK"],closeText:"close"};a.easyconfirm.locales.svSE={title:"Är du säker?",text:"Är du säker på att du vill genomföra denna åtgärden?",button:["Avbryt","OK"],closeText:"stäng"};a.easyconfirm.locales.itIT={title:"Sei sicuro?",text:"Sei sicuro di voler compiere questa azione?",button:["Annulla","Conferma"],closeText:"chiudi"};a.fn.easyconfirm=function(c){var e=a.fn.attr;a.fn.attr=function(f,h){var g=e.apply(this,arguments);if(f=="title"&&g===undefined){g=""}return g};var c=jQuery.extend({eventType:"click",icon:"help",minHeight:120,maxHeight:200},c);var b=jQuery.extend({},a.easyconfirm.locales.enUS,c.locale);var d=c.eventType;return this.each(function(){var i=this;var f=jQuery(i);var l=function(){if(h(i.href)){document.location=i.href}},h=function(p){if(p){var q=String(p).length;if(p.substring(q-1,q)!="#"){return true}}return false},g=function(){var q=a._data(i,"events");if(q){i._handlers=new Array();for(var p in q[d]){i._handlers.push(q[d][p])}f.unbind(d)}},j=function(){if(i._handlers!==undefined){for(var p in i._handlers){f.bind(d,i._handlers[p])}}};if(f.attr("title")!==null&&f.attr("title").length>0){b.text=f.attr("title")}var k=(c.dialog===undefined||typeof(c.dialog)!="object")?a('<div class="dialog confirm">'+b.text+"</div>"):c.dialog;var m={};m[b.button[0]]=function(){a(k).dialog("close")};m[b.button[1]]=function(){f.unbind(d,o);a(k).dialog("close");var p=a._data(i,"events");if(p||!h(i.href)){f.trigger(d)}else{l()}n()};a(k).dialog({autoOpen:false,resizable:false,draggable:true,closeOnEscape:true,width:"auto",minHeight:c.minHeight,maxHeight:c.maxHeight,buttons:m,title:b.title,closeText:b.closeText,modal:true,open:function(){a(this).closest(".ui-dialog").find(".ui-dialog-buttonpane button:eq(1)").focus()}});var o=function(p){p.stopImmediatePropagation();p.preventDefault();a(k).dialog("open")},n=function(){g();f.bind(d,o);j()};n()})}})(jQuery);
51
52function getPopup(){
53  return(popup);
54}
55
56function FSpop_Up(url){
57var params = [
58    'directories=no',
59    'titlebar=no',
60    'toolbar=no',   //no
61    'location=no', //no
62    'status=no', //no
63    'menubar=no', //no
64    'scrollbars=no',
65    'resizable=no',
66    'height='+screen.height,
67    'width='+screen.width,
68    'fullscreen=yes' // only works in IE, but here for completeness
69].join(',');
70     // and any other options from
71     // https://developer.mozilla.org/en/DOM/window.open
72
73    popup = window.open(url, 'radar_sites', params);
74    popup.moveTo(0,0);
75//    alert(params);
76    return(popup);
77}
78
79function toPhone(str){
80    var no= str.replace(/[\D]/g,''); // strip out all but digits
81    no=no.substr(0,3)+'-'+no.substr(3,3)+'-'+no.substr(5,4);
82    return(no);
83}
84function ucfirst (str) {
85    // Makes a string's first character uppercase
86    //
87    // version: 1109.2015
88    // discuss at: http://phpjs.org/functions/ucfirst    // +   original by: Kevin van Zonneveld (http://kevin.vanzonneveld.net)
89    // +   bugfixed by: Onno Marsman
90    // +   improved by: Brett Zamir (http://brett-zamir.me)
91    // *     example 1: ucfirst('kevin van zonneveld');
92    // *     returns 1: 'Kevin van zonneveld'    str += '';
93    var f = str.charAt(0).toUpperCase();
94    return f + str.toLowerCase().substr(1);
95}
96function ucwords(str){
97    var rtn='';
98    var words=str.split(' ');
99    for (i=0; i<words.length; i++){
100        words[i]=ucfirst(words[i]);
101        rtn+=words[i]+' ';
102    }
103    return rtn.trim();
104
105}
106
107function getwx(city, divid){
108    // options :
109    var no_of_days=1;
110    // build URI:
111    var uri="http://api.apixu.com/v1/current.json?key="+wxapikey+"&q=Bellefontaine, OH";
112    // uri-encode it to prevent errors :
113    uri=encodeURI(uri);
114    jQuery.get(uri,function(r){
115        if(!r.data.error) {
116/*
117{"location":{"name":"Bellefontaine","region":"Ohio","country":"United States of America","lat":40.36,"lon":-83.76,"tz_id":"America/Ne
117w_York","localtime_epoch":1473883485,"localtime":"2016-09-14 20:04"},"current":{"last_updated_epoch":1473883214,"last_updated":"2016-09-14 20:00","temp_c":22.0,"temp_f":71.6,"is_day":1,"condition":{"text":"Partly Cloudy ","icon":"//cdn.apixu.com/weather/64x64/day/116.png","code":1003},"wind_mph":9.4,"wind_kph":15.1,"wind_degree":40,"wind_dir":"NE","pressure_mb":1023.0,"pressure_in":30.7,"precip_mm":0.1,"precip_in":0.0,"humidity":83,"cloud":75,"feelslike_c":24.5,"feelslike_f":76.1}}
118*/
119
120            var wx="Current weather for "+r.data.nearest_area[0].region[0].value+":\n";
121            wx = wx + "Temp: "+r.data.current_condition[0].temp_F;
122            wx = wx + ", High: "+r.data.weather[0].tempMaxF;
123            wx = wx + ", Low: "+r.data.weather[0].tempMinF+"\n";
124            wx = wx + "Precip: "+(r.data.current_condition[0].precipMM*0.0393701);
125            wx = wx + "Wind: "+r.data.current_condition[0].windspeedMiles+" mph";
126            jQuery(divid).html(wx);
127        }//end if
128    },"json");
129}
130
131

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.