PageSourceSearch

https://arguskompetanse.no/pluginAppObj/pluginAppObj_10/main.js

js arguskompetanse.no collected 2026-10-09 02:44:33 UTC 7,009 bytes, 1 lines download raw bytes

1function weather_pluginAppObj_10(k){function getClassIconById(weatherId,isForecast){var prefix="wi wi-",code=weatherId,icon=mapOpenWeatherMapIcons[code].icon,today,hour;return isForecast==!0?(code>699&&code<800||code>899&&code<1e3||(icon="day-"+icon),icon=prefix+icon):(today=new Date,hour=today.getHours(),dorn=hour>6&&hour<20?"day-":"night-",icon=prefix+"owm-"+dorn+code),icon}function resize_weather(){var height=466,width=700,container_width=$("#pluginAppObj_10").parent().width(),inner_height=calculate_min_height(),new_height;$("#weather_pluginAppObj_10 .weather-wrapper").css({height:inner_height});container_width>width?$("#weather_pluginAppObj_10").css({width:width,height:height}):(new_height=container_width/width*height,$("#weather_pluginAppObj_10").css({width:container_width,height:Math.max(new_height,inner_height)}))}function errorApiKey(error){var img="<img src='data:image/gif;base64,R0lGODlhEAAQAPcAAAAAAFBQUFVUUVpYU5qIZqOQaKiTaraebryjcL6kcM2wdevGfe3Ifu3If76+vu3Kg+3Lhu7Ni+3Nje7Rl+7Unu7Wpe/Xqe/bte/euu/hxO/ixu/kzfDo2O7r5+3t7fDs5PHv6/Hv7PDv7fHx8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAP8ALAAAAAAQABAAAAh9AP8JHEiwoMF/IDJ0OFjQAwUGFBgWZEBxg8R/IiRQZCDhIgYGBQIUYICB4YcHIEUyeMDQAkUDAwxQtFDQAYcGFEOOZNCAQ8EJGxMEULBxwoiBGjYqVapBYIgISg8IQKA0Qoh/F5YSUKn0wj+USxcsXfmvAoSzaNOirXDxYEAAOw=='/>",err_cityNotFound,err;if($("#weather_pluginAppObj_10").empty().css("background-color","transparent"),uipreview)if(error.toLowerCase()=="city not found")err="Error:",err_cityNotFound="city not found.",$("#weather_pluginAppObj_10").append('<div class="error_post_container"><div class="error_post_thumb">'+img+'<\/div><div class="error_post_content p_error_ui">'+err+" "+err_cityNotFound+"");else if(error.toLowerCase().startsWith("invalid api key")){var link_info="https://openweathermap.org/appid";$("#weather_pluginAppObj_10").append('<div class="error_post_container"><div class="error_post_thumb">'+img+'<\/div><div class="error_post_content p_error_ui">To use this object you need to compile the API Key field.<br><br><p>More information about <a href=\''+link_info+"' target='_blank'>"+link_info+"<\/a>.<\/p><\/div><\/div>")}else err="Error: "+error,$("#weather_pluginAppObj_10").append('<div class="error_post_container"><div class="error_post_thumb">'+img+'<\/div><div class="error_post_content p_error_ui">'+err+"")}function calculate_min_height(){var extras_height=60,days_height=90,extras=0,width=700,container_width=$("#pluginAppObj_10").width(),extras_per_row,days_per_row;return width=Math.min(width,container_width),!0&&extras++,!0&&extras++,!0&&extras++,!0&&extras++,!1&&extras++,!0&&extras++,extras_per_row=Math.floor(container_width/120),extras_height=extras_height*Math.ceil(extras/extras_per_row),days_per_row=Math.floor(container_width/80),days_height=days_height*Math.ceil(4/days_per_row),115+extras_height+days_height}function supportWeekdays(){try{(new Date).toLocaleString("i")}catch(e){return e.name==="RangeError"}return!1}var uipreview=!1,container=$("#pluginAppObj_10");x5engine.boot.push(function(){var name="Home",show_minmax=!0,show_wind=!0,show_humidity=!0,show_visibility=!0,show_pressure=!1,show_sunrise=!0,next_days="4",forecast=next_days==="0"?"false":"true",lang="NO";if(resize_weather(),k==""&&uipreview){errorApiKey("invalid api key");return}$.openWeather({location:"Rånåsfoss",units_temp:"c",units_visibility:"km",units_pressure:"bar",lang:lang,forecast:forecast,forecastdays:next_days,apikey:k,success:function(weather){var i,currDate,weekdayType,dayString;for($("#weather_pluginAppObj_10").addClass("success"),html='<div class="weather-wrapper">',html+='<div class="main-weather">',html+='   <div class="icon '+getClassIconById(weather.weatherId,!1)+'"><\/div>',html+='   <div class="temp">'+weather.temp+"&deg;"+weather.units.temp+"<\/div>",html+='   <div class="name">'+name+"<\/div>",html+="<\/div>",html+='<div class="extra-weather">',show_minmax&&(html+='   <div class="extra min-max"><div class="line"><div class="icon min-icon"><\/div>'+weather.low+'&deg;<\/div><div class="line"><div class="icon max-icon"><\/div>'+weather.high+"&deg;<\/div><\/div>"),show_wind&&(html+='   <div class="extra wind"><div class="line"><div class="icon wind-icon"><\/div>'+weather.wind.speed+" "+weather.units.speed+'<\/div><div class="line"><div class="icon wind-dir-icon"><\/div>'+weather.wind.direction+"<\/div><\/div>"),show_humidity&&(html+='   <div class="extra humidity single-line"><div class="line"><div class="icon humidity-icon"><\/div>'+weather.humidity+" "+weather.units.humidity+"<\/div><\/div>"),show_visibility&&(html+='   <div class="extra visibility single-line"><div class="line"><div class="icon visibility-icon"><\/div>'+weather.visibility+" "+weather.units.visibility+"<\/div><\/div>"),show_pressure&&(html+='   <div class="extra pressure single-line"><div class="line"><div class="icon pressure-icon"><\/div>'+weather.pressure+" "+weather.units.pressure+"<\/div><\/div>"),show_sunrise&&(html+='   <div class="extra sunrise"><div class="line"><div class="icon sunrise-icon"><\/div>'+weather.sunrise+'<\/div><div class="line"><div class="icon sunset-icon"><\/div>'+weather.sunset+"<\/div><\/div>"),html+="<\/div>",html+='<div class="next-weather">',i=0;i<next_days;
1i++)html+='<div class="next-day">',currDate=new Date(weather.forecast[i].date),weekdayType="long",lang=="RU"&&(weekdayType="short"),dayString=supportWeekdays()?currDate.toLocaleString(lang,{weekday:weekdayType}):currDate.getDate()+"/"+(currDate.getMonth()+1),html+='   <div class="day-name">'+dayString+"<\/div>",html+='   <div class="icon '+getClassIconById(weather.forecast[i].weatherId,!0)+'"><\/div>',html+='   <div class="minmax">'+Math.round(weather.forecast[i].low)+"&deg; | "+Math.round(weather.forecast[i].high)+"&deg;<\/div>",html+="<\/div>";html+="<\/div>";html+="<\/div>";$("#weather_pluginAppObj_10").html(html);!1&&typeof weather.title!="undefined"&&$("#weather_pluginAppObj_10").prepend("<div class='debug-msg'>"+weather.title+"<\/div>");resize_weather()},error:function(error){$("#weather_pluginAppObj_10").removeClass("success");errorApiKey(error)}})});$("#imContent").on("breakpointChangedOrFluid",function(){resize_weather()})}

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.