PageSourceSearch

https://www.diffuz.com/js/jalios/core/jalios-prefs.js

js diffuz.com collected 2026-10-03 22:02:50 UTC 1,267 bytes, 61 lines download raw bytes

1 !function ($) {
2  
3  // Namespace
4  if (!$.jalios) { $.jalios    = {}; }
5
6  // ------------------------------------------
7  //  PRIVATE
8  // ------------------------------------------
9 
10  var register = function(){
11    
12    // Turn on automatic storage of JSON objects
13    $.cookie.json = true;
14    
15    // Init the prefs cookie
16    init();
17  }
18 
19  var init = function(){
20    var cookie = $.cookie($.jalios.Prefs.id);
21    if (!cookie){
22      cookie = $.cookie($.jalios.Prefs.id, { 'id' : 'jcms' });
23    }
24  }
25  
26  var get = function(key){
27    return $.cookie($.jalios.Prefs.id)[key];
28  }
29  
30  var set = function(key, value){
31    var prefs  = $.cookie($.jalios.Prefs.id);
32    prefs[key] = value;
33    $.cookie($.jalios.Prefs.id, prefs);
34  }
35  
36  // ------------------------------------------
37  //  PUBLIC
38  // ------------------------------------------
39 
40  $.jalios.Prefs = {
41    
42    id: 'jcms.prefs',
43    
44    data: function(key, value){
45      if (value === undefined){
46        return get(key);
47      }
48      set(key, value);
49    }
50  }
51  
52  // ------------------------------------------
53  //  READY
54  // ------------------------------------------
55  
56  // Plugin initialization on DOM ready
57  $(document).ready(function($) {
58    register();
59  });
60  
61}(window.jQuery);

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.