Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /**
- * Here we place functions dependant on jQuery
- * the rest could be wraped into domready function
- * in postinit.js
- */
- /**
- * init bootstarpcarousel
- * (in HTML add class="carousel slide" to #topbanner_carousel)
- */
- (function (a, b) {
- "use strict";
- "undefined"!==typeof window.jQuery&&domready(function(){
- if (a && b) {
- var h = $("#topbanner_carousel");
- if (980 > sbizDeviceWidth) {
- a.style.height = 0;
- b.style.visibility = "hidden";
- } else {
- a.style.height = "124px";
- b.style.visibility = "visible";
- h.carousel({
- interval : 8000
- });
- }
- addEvent(window, "resize", function (e) {
- var c = window.innerWidth ? 0 < window.innerWidth ? window.innerWidth : screen.width : "";
- if (980 > c) {
- a.style.height = 0;
- b.style.visibility = "hidden";
- h.carousel('pause');
- } else {
- a.style.height = "124px";
- b.style.visibility = "visible";
- h.carousel('cycle');
- }
- }, false);
- }
- });
- }
- (
- (document.getElementById("topbannerwrapper") || ""),
- (document.getElementById("topbanner_carousel") || "")
- ));
- /**
- * we don't want the navbar follow down
- * when its width is too narrow
- */
- /**/
- (function (a) {
- "use strict";
- "undefined"!==typeof window.jQuery&&domready(function(){
- if (a) {
- addEvent(document, "scroll", function (e) {
- var b = $(document).scrollTop(),
- c = window.innerWidth ? 0 < window.innerWidth ? window.innerWidth : screen.width : "";
- if (b > 181 && 980 < c) {
- a.setAttribute("style", "position:fixed;");
- } else {
- a.setAttribute("style", "position:relative;");
- }
- }, false);
- }
- });
- }
- (
- (document.getElementById("topbar") || "")
- ));
- /**
- * add SF stats for screensaver into topbanner
- * http://localhost/scripts/getjson/?load=https%3A%2F%2Fsourceforge.net%2Fprojects%2Fiv-scr-en-ru%2Ffiles%2Fstats%2Fjson%3Fstart_date%3D2010-06-05%26end_date%3D2012-04-15
- */
- (function (h) {
- "use strict";
- "undefined"!==typeof window.jQuery&&domready(function(){
- if (h) {
- var url = "https://sourceforge.net/projects/iv-scr-en-ru/files/stats/json?start_date=2010-06-05&end_date=" + sbizFnGetYyyymmdd();
- $.ajax({
- url : "/scripts/getjson/?load=" + encodeURIComponent(url),
- dataType : "json",
- async : true,
- success : function (data) {
- if (data) {
- h.appendChild(document.createTextNode("(\u0432\u0441\u0435\u0433\u043E \u0437\u0430\u0433\u0440\u0443\u0437\u043E\u043A: " +
- data.summaries.time.downloads + ", \u0438\u0437 \u043D\u0438\u0445 " +
- data.summaries.geo.percent + "% \u0438\u0437 " +
- data.summaries.geo.top + ", " +
- data.summaries.os.percent + "% \u043F\u043E\u0434 " +
- data.summaries.os.top +
- ")"));
- }
- }
- });
- }
- });
- }
- (
- (document.getElementById("sf_ivscrenru_stat") || "")
- ));
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement