2 // if the class is already set, the font has already been loaded
3 if( w.document.documentElement.className.indexOf( "fonts-loaded" ) > -1 ){
6 var PrimaryFont = new w.FontFaceObserver( "NotoSans", {
10 PrimaryFont.load(null, 5000).then(function(){
11 w.document.documentElement.className += " fonts-loaded";
13 console.log("Failed");
17 // http://stackoverflow.com/questions/1038746/equivalent-of-string-format-in-jquery/5341855#5341855
18 String.prototype.format = function() { return formatstr(this, arguments) }
19 function formatstr(str, col) {
20 col = typeof col === 'object' ? col : Array.prototype.slice.call(arguments, 1);
22 return str.replace(/%%|%s|%(\d+)\$s/g, function (m, n) {
23 if (m == "%%") { return "%"; }
24 if (m == "%s") { return col[idx++]; }
29 function confirmDelete(message) {
30 return (confirm(message) ? true : false);
33 function Dopop(link) {
34 newin=window.open(link,'popup','width=500,height=400,toolbar=false,scrollbars=yes,resizeable=yes');
37 jQuery.fn.preventDoubleFormSubmit = function() {
38 jQuery(this).submit(function() {
39 if (this.beenSubmitted)
42 this.beenSubmitted = true;
46 function prefixOf (s, tok) {
47 var index = s.indexOf(tok);
48 return s.substring(0, index);
50 function suffixOf (s, tok) {
51 var index = s.indexOf(tok);
52 return s.substring(index + 1);