PageSourceSearch

https://www.theinquisitor.com/sites/theinquisitor.etypegoogle7.com…KZLfWzAEX998mfEnwi1WFJTQh5WOhdmb5P6kWf6g.js

js theinquisitor.com collected 2026-09-25 20:59:38 UTC 14,440 bytes, 372 lines download raw bytes

1/* add custom js */
2(function ($) {
3  'use strict';
4  Drupal.behaviors.etype = {
5    attach: function (context, settings) {
6      $('a[href$="e-edition"]').attr('target', '_blank');
7
8      var autocompleteOff = function () {
9        if ($('#contact-site-form').length) {
10          var field = 'autocomplete';
11          var fill = 'nope';
12          $('#contact-site-form').attr(field, 'off');
13          $('#contact-site-form .form-item input[type="text"]').attr(field, fill);
14          $('#contact-site-form .form-item textarea').attr(field, fill);
15        }
16      };
17      autocompleteOff();
18    }
19  };
20
21  /**
22   * Keeps the UserWay accessibility button clear of the Klaro consent notice.
23   *
24   * Both are fixed to the bottom right, so while the notice is showing it
25   * covers the button. The notice's height depends on viewport width and how
26   * its text wraps, so measure it rather than guess an offset.
27   */
28  Drupal.behaviors.etypeKlaroUserway = {
29    attach: function (context, settings) {
30      if (context !== document || Drupal.etypeKlaroUserwayBound) {
31        return;
32      }
33      Drupal.etypeKlaroUserwayBound = true;
34
35      var GAP = 12;
36      var root = document.documentElement;
37      var sizeWatcher = null;
38
39      // Publish the clearance, or drop it so styles.css falls back to 74px.
40      var apply = function () {
41        var notice = document.querySelector('#klaro .cookie-notice');
42        if (!notice || !notice.offsetHeight) {
43          root.style.removeProperty('--etype-uw-bottom');
44          return;
45        }
46        // Viewport bottom to notice top, which already includes the notice's
47        // own bottom offset.
48        var fromBottom = window.innerHeight - notice.getBoundingClientRect().top;
49        root.style.setProperty('--etype-uw-bottom', Math.round(fromBottom + GAP) + 'px');
50      };
51
52      // Klaro inserts the notice before it has a height and lays it out a
53      // moment later, and it shows and hides the notice by changing classes
54      // rather than by adding and removing the element. Measuring once on
55      // insertion therefore reads zero and never corrects itself, so watch the
56      // notice's size for as long as it exists.
57      var update = function () {
58        var notice = document.querySelector('#klaro .cookie-notice');
59        if (!notice) {
60          if (sizeWatcher) {
61            sizeWatcher.disconnect();
62            sizeWatcher = null;
63          }
64          root.style.removeProperty('--etype-uw-bottom');
65          return;
66        }
67        if (window.ResizeObserver && !sizeWatcher) {
68          sizeWatcher = new ResizeObserver(apply);
69          sizeWatcher.observe(notice);
70        }
71        apply();
72      };
73
74      // Klaro builds its own #klaro container at runtime -- it is not in the
75      // server HTML -- so there is nothing Klaro-specific to attach to when
76      // Drupal behaviors run. Watch the document instead and let update()
77      // decide, debounced to a frame so a busy page stays cheap.
78      var scheduled = false;
79      var schedule = function () {
80        if (scheduled) {
81          return;
82        }
83        scheduled = true;
84        window.requestAnimationFrame(function () {
85          scheduled = false;
86          update();
87        });
88      };
89
90      if (window.MutationObserver) {
91        new MutationObserver(schedule).observe(document.body, {
92          childList: true,
93          subtree: true
94        });
95      }
96      // .on() would break sites without jquery_update (D7 core ships 1.4.4,
97      // and .on() only landed in 1.7). .resize() has been in jQuery since 1.0.
98      $(window).resize(apply);
99      update();
100    }
101  };
102
103})(jQuery);;
104/**
105* hoverIntent r6 // 2011.02.26 // jQuery 1.5.1+
106* <http://cherne.net/brian/resources/jquery.hoverIntent.html>
107* 
108* @param  f  onMouseOver function || An object with configuration options
109* @param  g  onMouseOut function  || Nothing (use configuration options object)
110* @author    Brian Cherne brian(at)cherne(dot)net
111*/
112(function($){$.fn.hoverIntent=function(f,g){var cfg={sensitivity:7,interval:100,timeout:0};cfg=$.extend(cfg,g?{over:f,out:g}:f);var cX,cY,pX,pY;var track=function(ev){cX=ev.pageX;cY=ev.pageY};var compare=function(ev,ob){ob.hoverIntent_t=clearTimeout(ob.hoverIntent_t);if((Math.abs(pX-cX)+Math.abs(pY-cY))<cfg.sensitivity){$(ob).unbind("mousemove",track);ob.hoverIntent_s=1;return cfg.over.apply(ob,[ev])}else{pX=cX;pY=cY;ob.hoverIntent_t=setTimeout(function(){compare(ev,ob)},cfg.interval)}};var delay=function(ev,ob){ob.hoverIntent_t=clearTimeout(ob.hoverIntent_t);ob.hoverIntent_s=0;return cfg.out.apply(ob,[ev])};var handleHover=function(e){var ev=jQuery.extend({},e);var ob=this;if(ob.hoverIntent_t){ob.hoverIntent_t=clearTimeout(ob.hoverIntent_t)}if(e.type=="mouseenter"){pX=ev.pageX;pY=ev.pageY;$(ob).bind("mousemove",track);if(ob.hoverIntent_s!=1){ob.hoverIntent_t=setTimeout(function(){compare(ev,ob)},cfg.interval)}}else{$(ob).unbind("mousemove",track);if(ob.hoverIntent_s==1){ob.hoverIntent_t=setTimeout(function(){delay(ev,ob)},cfg.timeout)}}};return this.bind('mouseenter',handleHover).bind('mouseleave',handleHover)}})(jQuery);;
113/*
114 * Superfish v1.4.8 - jQuery menu widget
115 * Copyright (c) 2008 Joel Birch
116 *
117 * Dual licensed under the MIT and GPL licenses:
118 *  http://www.opensource.org/licenses/mit-license.php
119 *  http://www.gnu.org/licenses/gpl.html
120 *
121 * CHANGELOG: http://users.tpg.com.au/j_birch/plugins/superfish/changelog.txt
122 */
123/*
124 * This is not the original jQuery Supersubs plugin.
125 * Please refer to the README for more information.
126 */
127
128(function($){
129  $.fn.superfish = function(op){
130    var sf = $.fn.superfish,
131      c = sf.c,
132      $arrow = $(['<span class="',c.arrowClass,'"> &#187;</span>'].join('')),
133      over = function(){
134        var $$ = $(this), menu = getMenu($$);
135        clearTimeout(menu.sfTimer);
136        $$.showSuperfishUl().siblings().hideSuperfishUl();
137      },
138      out = function(){
139        var $$ = $(this), menu = getMenu($$), o = sf.op;
140        clearTimeout(menu.sfTimer);
141        menu.sfTimer=setTimeout(function(){
142          o.retainPath=($.inArray($$[0],o.$path)>-1);
143          $$.hideSuperfishUl();
144          if (o.$path.length && $$.parents(['li.',o.hoverClass].join('')).length<1){over.call(o.$path);}
145        },o.delay);
146      },
147      getMenu = function($menu){
148        var menu = $menu.parents(['ul.',c.menuClass,':first'].join(''))[0];
149        sf.op = sf.o[menu.serial];
150        return menu;
151      },
152      addArrow = function($a){ $a.addClass(c.anchorClass).append($arrow.clone()); };
153
154    return this.each(function() {
155      var s = this.serial = sf.o.length;
156      var o = $.extend({},sf.defaults,op);
157      o.$path = $('li.'+o.pathClass,this).slice(0,o.pathLevels).each(function(){
158        $(this).addClass([o.hoverClass,c.bcClass].join(' '))
159          .filter('li:has(ul)').removeClass(o.pathClass);
160      });
161      sf.o[s] = sf.op = o;
162
163      $('li:has(ul)',this)[($.fn.hoverIntent && !o.disableHI) ? 'hoverIntent' : 'hover'](over,out).each(function() {
164        if (o.autoArrows) addArrow( $('>a:first-child',this) );
165      })
166      .not('.'+c.bcClass)
167        .hideSuperfishUl();
168
169      var $a = $('a',this);
170      $a.each(function(i){
171        var $li = $a.eq(i).parents('li');
172        $a.eq(i).focus(function(){over.call($li);}).blur(function(){out.call($li);});
173      });
174      o.onInit.call(this);
175
176    }).each(function() {
177      var menuClasses = [c.menuClass];
178      if (sf.op.dropShadows  && !($.browser.msie && $.browser.version < 7)) menuClasses.push(c.shadowClass);
179      $(this).addClass(menuClasses.join(' '));
180    });
181  };
182
183  var sf = $.fn.superfish;
184  sf.o = [];
185  sf.op = {};
186  sf.IE7fix = function(){
187    var o = sf.op;
188    if ($.browser.msie && $.browser.version > 6 && o.dropShadows && o.animation.opacity!=undefined)
189      this.toggleClass(sf.c.shadowClass+'-off');
190    };
191  sf.c = {
192    bcClass: 'sf-breadcrumb',
193    menuClass: 'sf-js-enabled',
194    anchorClass: 'sf-with-ul',
195    arrowClass: 'sf-sub-indicator',
196    shadowClass: 'sf-shadow'
197  };
198  sf.defaults = {
199    hoverClass: 'sfHover',
200    pathClass: 'overideThisToUse',
201    pathLevels: 1,
202    delay: 800,
203    animation: {opacity:'show'},
204    speed: 'normal',
205    autoArrows: true,
206    dropShadows: true,
207    disableHI: false, // true disables hoverIntent detection
208    onInit: function(){}, // callback functions
209    onBeforeShow: function(){},
210    onShow: function(){},
211    onHide: function(){}
212  };
213  $.fn.extend({
214    hideSuperfishUl : function(){
215      var o = sf.op,
216        not = (o.retainPath===true) ? o.$path : '';
217      o.retainPath = false;
218      var $ul = $(['li.',o.hoverClass].join(''),this).add(this).not(not).removeClass(o.hoverClass)
219          .find('>ul').css({top: '-99999em'}).addClass('sf-hidden');
220      o.onHide.call($ul);
221      return this;
222    },
223    showSuperfishUl : function(){
224      var o = sf.op,
225        sh = sf.c.shadowClass+'-off',
226        $ul = this.addClass(o.hoverClass)
227          .find('>ul.sf-hidden').css({display: 'none', top: ''}).removeClass('sf-hidden');
228      sf.IE7fix.call($ul);
229      o.onBeforeShow.call($ul);
230      $ul.animate(o.animation,o.speed,function(){ sf.IE7fix.call($ul); o.onShow.call($ul); });
231      return this;
232    }
233  });
234})(jQuery);;
235/*
236 * Supersubs v0.2b - jQuery plugin
237 * Copyright (c) 2008 Joel Birch
238 *
239 * Dual licensed under the MIT and GPL licenses:
240 *  http://www.opensource.org/licenses/mit-license.php
241 *  http://www.gnu.org/licenses/gpl.html
242 *
243 * This plugin automatically adjusts submenu widths of suckerfish-style menus to that of
244 * their longest list item children. If you use this, please expect bugs and report them
245 * to the jQuery Google Group with the word 'Superfish' in the subject line.
246 *
247 */
248/*
249 * This is not the original jQuery Supersubs plugin.
250 * Please refer to the README for more information.
251 */
252
253(function($){ // $ will refer to jQuery within this closure
254  $.fn.supersubs = function(options){
255    var opts = $.extend({}, $.fn.supersubs.defaults, options);
256    // return original object to support chaining
257    return this.each(function() {
258      // cache selections
259      var $$ = $(this);
260      // support metadata
261      var o = $.meta ? $.extend({}, opts, $$.data()) : opts;
262      // get the font size of menu.
263      // .css('fontSize') returns various results cross-browser, so measure an em dash instead
264      var fontsize = $('<li id="menu-fontsize">&#8212;</li>').css({
265        'padding' : 0,
266        'position' : 'absolute',
267        'top' : '-99999em',
268        'width' : 'auto'
269      }).appendTo($$).width(); //clientWidth is faster, but was incorrect here
270      // remove em dash
271      $('#menu-fontsize').remove();
272
273      // Jump on level if it's a "NavBar"
274      if ($$.hasClass('sf-navbar')) {
275        $$ = $('li > ul', $$);
276      }
277      // cache all ul elements 
278      $ULs = $$.find('ul:not(.sf-megamenu)');
279      // loop through each ul in menu
280      $ULs.each(function(i) {
281        // cache this ul
282        var $ul = $ULs.eq(i);
283        // get all (li) children of this ul
284        var $LIs = $ul.children();
285        // get all anchor grand-children
286        var $As = $LIs.children('a');
287        // force content to one line and save current float property
288        var liFloat = $LIs.css('white-space','nowrap').css('float');
289        // remove width restrictions and floats so elements remain vertically stacked
290        var emWidth = $ul.add($LIs).add($As).css({
291          'float' : 'none',
292          'width'  : 'auto'
293        })
294        // this ul will now be shrink-wrapped to longest li due to position:absolute
295        // so save its width as ems. Clientwidth is 2 times faster than .width() - thanks Dan Switzer
296        .end().end()[0].clientWidth / fontsize;
297        // add more width to ensure lines don't turn over at certain sizes in various browsers
298        emWidth += o.extraWidth;
299        // restrict to at least minWidth and at most maxWidth
300        if (emWidth > o.maxWidth)    { emWidth = o.maxWidth; }
301        else if (emWidth < o.minWidth)  { emWidth = o.minWidth; }
302        emWidth += 'em';
303        // set ul to width in ems
304        $ul.css('width',emWidth);
305        // restore li floats to avoid IE bugs
306        // set li width to full width of this ul
307        // revert white-space to normal
308        $LIs.css({
309          'float' : liFloat,
310          'width' : '100%',
311          'white-space' : 'normal'
312        })
313        // update offset position of descendant ul to reflect new width of parent
314        .each(function(){
315          var $childUl = $('>ul',this);
316          var offsetDirection = $childUl.css('left')!==undefined ? 'left' : 'right';
317          $childUl.css(offsetDirection,emWidth);
318        });
319      });
320    });
321  };
322  // expose defaults
323  $.fn.supersubs.defaults = {
324    minWidth: 9, // requires em unit.
325    maxWidth: 25, // requires em unit.
326    extraWidth: 0 // extra width can ensure lines don't sometimes turn over due to slight browser differences in how they round-off values
327  };
328})(jQuery); // plugin code ends;
329/**
330 * @file
331 * The Superfish Drupal Behavior to apply the Superfish jQuery plugin to lists.
332 */
333
334(function ($) {
335  Drupal.behaviors.superfish = {
336    attach: function (context, settings) {
337      // Take a look at each list to apply Superfish to.
338      $.each(settings.superfish || {}, function(index, options) {
339        // Process all Superfish lists.
340        $('#superfish-' + options.id, context).once('superfish', function() {
341          var list = $(this);
342
343          // Check if we are to apply the Supersubs plug-in to it.
344          if (options.plugins || false) {
345            if (options.plugins.supersubs || false) {
346              list.supersubs(options.plugins.supersubs);
347            }
348          }
349
350          // Apply Superfish to the list.
351          list.superfish(options.sf);
352
353          // Check if we are to apply any other plug-in to it.
354          if (options.plugins || false) {
355            if (options.plugins.touchscreen || false) {
356              list.sftouchscreen(options.plugins.touchscreen);
357            }
358            if (options.plugins.smallscreen || false) {
359              list.sfsmallscreen(options.plugins.smallscreen);
360            }
361            if (options.plugins.supposition || false) {
362              list.supposition();
363            }
364            if (options.plugins.bgiframe || false) {
365              list.find('ul').bgIframe({opacity:false});
366            }
367          }
368        });
369      });
370    }
371  };
372})(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.