PageSourceSearch

https://www.motorteiledirekt.de/js/mage/cookies.js?v=1760513748

js motorteiledirekt.de collected 2026-10-06 13:16:56 UTC 2,428 bytes, 72 lines download raw bytes

1/**
2 * OpenMage
3 *
4 * NOTICE OF LICENSE
5 *
6 * This source file is subject to the Academic Free License (AFL 3.0)
7 * that is bundled with this package in the file LICENSE_AFL.txt.
8 * It is also available through the world-wide-web at this URL:
9 * https://opensource.org/licenses/afl-3.0.php
10 * If you did not receive a copy of the license and are unable to
11 * obtain it through the world-wide-web, please send an email
12 * to [email protected] so we can send you a copy immediately.
13 *
14 * @category    Mage
15 * @package     js
16 * @copyright   Copyright (c) 2006-2020 Magento, Inc. (https://www.magento.com)
17 * @copyright   Copyright (c) 2018-2019 The OpenMage Contributors (https://www.openmage.org)
18 * @license     https://opensource.org/licenses/afl-3.0.php  Academic Free License (AFL 3.0)
19 */
20// old school cookie functions grabbed off the web
21
22if (!window.Mage) var Mage = {};
23
24Mage.Cookies = {};
25Mage.Cookies.expires  = null;
26Mage.Cookies.path     = '/';
27Mage.Cookies.domain   = null;
28Mage.Cookies.secure   = false;
29Mage.Cookies.set = function(name, value){
30     var argv = arguments;
31     var argc = arguments.length;
32     var expires = (argc > 2) ? argv[2] : Mage.Cookies.expires;
33     var path = (argc > 3) ? argv[3] : Mage.Cookies.path;
34     var domain = (argc > 4) ? argv[4] : Mage.Cookies.domain;
35     var secure = (argc > 5) ? argv[5] : Mage.Cookies.secure;
36     document.cookie = name + "=" + escape (value) +
37       ((expires == null) ? "" : ("; expires=" + expires.toUTCString())) +
38       ((path == null) ? "" : ("; path=" + path)) +
39       ((domain == null) ? "" : ("; domain=" + domain)) +
40       ((secure == true) ? "; secure" : "");
41};
42
43Mage.Cookies.get = function(name){
44    var arg = name + "=";
45    var alen = arg.length;
46    var clen = document.cookie.length;
47    var i = 0;
48    var j = 0;
49    while(i < clen){
50        j = i + alen;
51        if (document.cookie.substring(i, j) == arg)
52            return Mage.Cookies.getCookieVal(j);
53        i = document.cookie.indexOf(" ", i) + 1;
54        if(i == 0)
55            break;
56    }
57    return null;
58};
59
60Mage.Cookies.clear = function(name) {
61  if(Mage.Cookies.get(name)){
62       Mage.Cookies.set(name, '', new Date(0));
63  }
64};
65
66Mage.Cookies.getCookieVal = function(offset){
67   var endstr = document.cookie.indexOf(";", offset);
68   if(endstr == -1){
69       endstr = document.cookie.length;
70   }
71   return unescape(document.cookie.substring(offset, endstr));
72};

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.