1// utils is a collection of often used methods 2// 3// Documentation available at https://github.com/Limepark/common/tree/master/utils. 4// 5// Copyright (C) 2013 Limepark AB 6/* globals sv */ 7var lp = (function (exports) { 8 var utils = exports.utils = exports.utils || {}; 9 10 utils.isOnlineMode = function () { 11 return window.self === window.top; 12 }; 13 14 var currentPageIdBeginsWith = function(str) { 15 var pageId = window.sv && sv.PageContext ? sv.PageContext.pageId : null; 16 if (!pageId) { 17 return false; 18 } 19 20 return pageId.substr(0, str.length) == str; 21 }; 22 23 utils.isTemplate = function () { 24 return currentPageIdBeginsWith('91.'); 25 }; 26 27 utils.isPage = function () { 28 return currentPageIdBeginsWith('4.'); 29 }; 30 31 utils.isArticle = function () { 32 return currentPageIdBeginsWith('5.'); 33 }; 34 35 return exports; 36}(lp || {}));
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.