PageSourceSearch

https://tipto.co.uk/sites/Base/modules/Browser/components/Cookie/js/EU-cookielaw.js

js tipto.co.uk collected 2026-10-09 01:06:57 UTC 6,951 bytes, 117 lines download raw bytes

1/*!
2* jQuery Cookie Plugin
3* https://github.com/carhartl/jquery-cookie
4*
5* Copyright 2011, Klaus Hartl
6* Dual licensed under the MIT or GPL Version 2 licenses.
7* http://www.opensource.org/licenses/mit-license.php
8* http://www.opensource.org/licenses/GPL-2.0
9*/
10(function ($) {
11    $.cookie = function (key, value, options) {
12        // key and at least value given, set cookie...
13        if (arguments.length > 1 && (!/Object/.test(Object.prototype.toString.call(value)) || value === null || value === undefined)) {
14            options = $.extend({}, options);
15            if (value === null || value === undefined) {
16                options.expires = -1;
17            }
18            if (typeof options.expires === 'number') {
19                var days = options.expires, t = options.expires = new Date();
20                t.setDate(t.getDate() + days);
21            }
22            value = String(value);
23            return (document.cookie = [
24encodeURIComponent(key), '=', options.raw ? value : encodeURIComponent(value),
25options.expires ? '; expires=' + options.expires.toUTCString() : '', // use expires attribute, max-age is not supported by IE
26options.path ? '; path=' + options.path : '',
27options.domain ? '; domain=' + options.domain : '',
28options.secure ? '; secure' : ''
29].join(''));
30        }
31        // key and possibly options given, get cookie...
32        options = value || {};
33        var decode = options.raw ? function (s) { return s; } : decodeURIComponent;
34        var pairs = document.cookie.split('; ');
35        for (var i = 0, pair; pair = pairs[i] && pairs[i].split('='); i++) {
36            if (decode(pair[0]) === key) return decode(pair[1] || ''); // IE saves cookies with empty string as "c; ", e.g. without "=" as opposed to EOMB, thus pair[1] may be undefined
37        }
38        return null;
39    };
40})(jQuery);
41function showCookiesMessage(params) {
42    if (params.timeOut == null) params.timeOut = 60000;
43    if (params.width == null) params.width = 978;
44    if (params.height == null) params.height = 30;
45    if (params.fontSize == null) params.fontSize = 20;
46    if (params.opacity == null) params.opacity = 0.9;
47    if (params.fontColor == null) params.fontColor = "#FFFFFF";
48    if (params.fontFamily == null) params.fontFamily = "arial";
49    if (params.background == null) params.background = "#2D4563";
50    if (params.messageText == null) params.messageText = new Array();
51    if (params.messageText[0] == null) params.messageText[0] = "By using travelweekly.co.uk you agree to our ";
52    if (params.messageText[1] == null) params.messageText[1] = "cookies and privacy policies";
53    if (params.messageText[2] == null) params.messageText[2] = "";
54    if (params.acceptText == null) params.acceptText = "OK";
55    if (params.termsLink == null) params.termsLink = "http://www.travelweekly.co.uk/StaticPages/privacy.html";
56    if (params.paddingTop == null) params.paddingTop = 0;
57    if (params.acceptPadding == null) params.acceptPadding = 5;
58    if (params.acceptMargin == null) params.acceptMargin = 3;
59    setTimeout(function () { $("#privacy-cookieMessage").fadeOut(1000); }, params.timeOut);
60    if ($.cookie("cookiesOk") != 1) {
61       $('#everything').append('<div id="privacy-cookieMessage" style="z-index:9999;position:fixed; bottom:0; width:100%; margin-left:auto; margin-right:auto; height:' + params.height + 'px;"><div style="width:' + params.width + 'px; margin-right:auto; margin-left:10px;position:relative;"><div id="privacy-cookieMessageInner" style="padding-left:10px; padding-top:' + params.paddingTop + 'px; bottom:0; margin-left:auto; margin-right:auto; height:' + params.height + 'px; background-color:' + params.background + '; opacity:' + params.opacity + '"></div><div id="cookieText" style=" pading-left:10px;color:' + params.fontColor + '; font-size:' + params.fontSize + 'px; font-family:' + "'" + params.fontFamily + "'" + '; position:absolute; top:' + params.paddingTop + 'px; left:10px;">' + params.messageText[0] + '<a href="' + params.termsLink + '" target="_blank" style="color:' + params.fontColor + '; text-decoration:underline;">' + params.messageText[1] + '</a>' + params.messageText[2] + '</div><div id="acceptCookies" style="float: right; background-color:' + params.background + ';font-size:' + params.fontSize + 'px;color:' + params.fontColor + ';
61 font-family:' + "'" + params.fontFamily + "'" + '; opacity:1; position:absolute; right:0; top:0; padding:' + params.acceptPadding + 'px; margin-right:10px; margin-top:' + params.acceptMargin + 'px; cursor: pointer;">' + params.acceptText + '</div></div></div>');
62    }
63}
64$(document).ready(function(){
65    $("#acceptCookies").live("click", function () {
66        $("#privacy-cookieMessage").fadeOut(1000);
67        $.cookie("cookiesOk", 1, { path: '/' ,  expires: 356 });
68    });
69    
70    //New cookies popups
71    //Accept
72    $("#acceptedCookies").live("click", function () {
73        $("#privacy-cookie-message").fadeOut(1000);
74        $.cookie("cookiesOk", 1, { path: '/' ,  expires: 1068 });
75        window.location.reload(true);
76    });
77    //Reject
78    $("#declinedCookies").live("click", function () {
79        $("#privacy-cookie-message").fadeOut(1000);
80        //$.cookie("cookiesOk", 0, { path: '/' });
81        $(".privacy-cookie-message-wrap_bg").addClass('active');
82        $(".privacy-cookie-message-wrap_popup").addClass('active');
83        $('html, body').animate( { scrollTop: 0 }, 1100 );
84    });
85    //Save all in popup
86    $("#privacy-cookie-message-save-all").live("click", function () {
87        $(".privacy-cookie-message-wrap_popup-form").hide();
88        $(".privacy-cookie-message-wrap_popup-OK").show();
89        $.cookie("cookiesOk", 1, { path: '/' ,  expires: 1068 });
90        $("#privacy-cookie-message-param-stat").prop('checked', true);
91    });
92    //Save preferences in popup
93    $("#privacy-cookie-message-save-preferences").live("click", function () {
94        $(".privacy-cookie-message-wrap_popup-form").hide();
95        $(".privacy-cookie-message-wrap_popup-OK").show();
96       if($("#privacy-cookie-message-param-stat").is(':checked')){
97           $.cookie("cookiesOk", 'statistics', { path: '/' ,  expires: 1068 });
98       }else{
99           $.cookie("cookiesOk", 'necessary', { path: '/' ,  expires: 1068 });
100       }
101    });
102    //Done popup
103    $("#privacy-cookie-message-done").live("click", function () {
104        $(".privacy-cookie-message-wrap_popup").removeClass('active');
105        $(".privacy-cookie-message-wrap_bg").removeClass('active');
106        $(".privacy-cookie-message-wrap_popup-form").show();
107        $(".privacy-cookie-message-wrap_popup-OK").hide();
108        window.location.reload(true);
109    });
110    //Open preferences popup
111    $("#cookiePreferencesLink").live("click", function () {
112        $(".privacy-cookie-message-wrap_bg").addClass('active');
113        $(".privacy-cookie-message-wrap_popup").addClass('active');
114        $('html, body').animate( { scrollTop: 0 }, 1100 );
115    });
116
117});

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.