MediaWiki:Common.js

From securityrouter.org, an OpenBSD-based firewall
Revision as of 12:45, 28 August 2018 by Anders (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Note: After saving, you may have to bypass your browser's cache to see the changes.

  • Firefox / Safari: Hold Shift while clicking Reload, or press either Ctrl-F5 or Ctrl-R (⌘-R on a Mac)
  • Google Chrome: Press Ctrl-Shift-R (⌘-Shift-R on a Mac)
  • Internet Explorer: Hold Ctrl while clicking Refresh, or press Ctrl-F5
  • Opera: Go to Menu → Settings (Opera → Preferences on a Mac) and then to Privacy & security → Clear browsing data → Cached images and files.
/* Any JavaScript here will be loaded for all users on every page load. */
// XXX Remember to change Mobile.js as well!
$(document).ready(function() {
  // Price
  if ($("#price-basic").length > 0) {
        $.ajax({
                url: "/price.php",
                dataType: "json",
                success: function(result) {
                        $("#price-803").text("$" + result["HSR-803"]);
                        $("#price-1204").text("$" + result["HSR-1204"]);
                        $("#price-1304").text("$" + result["HSR-1304"]);
                        $("#price-2006").text("$" + result["HSR-2006"]);
                        $("#price-2106").text("$" + result["HSR-2106"]);
                        $("#price-3008").text("$" + result["HSR-3008"]);
                        $("#price-3010").text("$" + result["HSR-3010"]);
                        $("#price-3116").text("$" + result["HSR-3116"]);
                        $("#price-lite").text("$" + result["VSR-Lite"]);
                        $("#price-basic").text("$" + result["VSR-Basic"]);
                        $("#price-plus").text("$" + result["VSR-Plus"]);
                        $("#price-unlimited").text("$" + result["VSR-Unlimited"]);
                        $("#price-update").text("$" + result["VSR-Update"] + " each");
                        $(".price-support").text("$" + result["Support"] + "/hour");
                        $("#price-basic-renewtext").text(" (for example $" + result["VSR-Basic-renew"] + " for basic)");
                        $("#price-renew").text("$" + result[$("#model").text() + "-renew"]);
                        $("#price-add-ipsec").text("$" + result["SR-ipsec"] + " each");
 	                $("#price-add-vlan").text("$" + result["SR-vlan"] + " each");
 	                $("#price-add-vpn").text("$" + result["SR-vpn"] + " each");
 	                $("#price-add-load-balancer").text("$" + result["SR-load-balancer"] + " each");
 	                $("#price-add-bgp").text("$" + result["SR-bgp"]);
	                $("#price-add-firewall-rules").text("$" + result["SR-firewall-rules"]);
                },
        });
  }
});

// Google Analytics
  (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
  (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
  m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
  })(window,document,'script','//www.google-analytics.com/analytics.js','ga');

  ga('create', 'UA-73635745-1', 'auto');
  ga('send', 'pageview');