1const basePulseemFolder = window.location.host.indexOf('localhost:') > -1 ? '' : '/Pulseem/'; 2//custom alert 3var isLoader = true; 4jQuery.browser = {}; 5(function ($) { 6 var Quickfit, QuickfitHelper, defaults, pluginName; 7 8 pluginName = 'quickfit'; 9 10 defaults = { 11 min: 8, 12 max: 12, 13 tolerance: 0.02, 14 truncate: false, 15 width: null, 16 sampleNumberOfLetters: 10, 17 sampleFontSize: 12 18 }; 19 QuickfitHelper = (function () { 20 21 var sharedInstance = null; 22 23 QuickfitHelper.instance = function (options) { 24 if (!sharedInstance) { 25 sharedInstance = new QuickfitHelper(options); 26 } 27 return sharedInstance; 28 }; 29 30 function QuickfitHelper(options) { 31 this.options = options; 32 33 this.item = $('<span id="meassure"></span>'); 34 this.item.css({ 35 position: 'absolute', 36 left: '-1000px', 37 top: '-1000px', 38 'font-size': "" + this.options.sampleFontSize + "px" 39 }); 40 $('body').append(this.item); 41 42 this.meassures = {}; 43 } 44 45 QuickfitHelper.prototype.getMeassure = function (letter) { 46 var currentMeassure; 47 currentMeassure = this.meassures[letter]; 48 if (!currentMeassure) { 49 currentMeassure = this.setMeassure(letter); 50 } 51 return currentMeassure; 52 }; 53 54 QuickfitHelper.prototype.setMeassure = function (letter) { 55 var currentMeassure, index, sampleLetter, text, _ref; 56 57 text = ''; 58 sampleLetter = letter === ' ' ? ' ' : letter; 59 60 for (index = 0, _ref = this.options.sampleNumberOfLetters - 1; 0 <= _ref ? index <= _ref : index >= _ref; 0 <= _ref ? index++ : index--) { 61 text += sampleLetter; 62 } 63 64 this.item.html(text); 65 currentMeassure = this.item.width() / this.options.sampleNumberOfLetters / this.options.sampleFontSize; 66 this.meassures[letter] = currentMeassure; 67 68 return currentMeassure; 69 }; 70 71 return QuickfitHelper; 72 73 })(); 74 75 Quickfit = (function () { 76 77 function Quickfit(element, options) { 78 this.$element = element; 79 this.options = $.extend({}, defaults, options); 80 this.$element = $(this.$element); 81 this._defaults = defaults; 82 this._name = pluginName; 83 this.quickfitHelper = QuickfitHelper.instance(this.options); 84 } 85 86 Quickfit.prototype.fit = function () { 87 var elementWidth; 88 if (!this.options.width) { 89 elementWidth = this.$element.width(); 90 this.options.width = elementWidth - this.options.tolerance * elementWidth; 91 } 92 if (this.text = this.$element.attr('data-quickfit')) { 93 this.previouslyTruncated = true; 94 } else { 95 this.text = this.$element.text(); 96 } 97 this.calculateFontSize(); 98 99 if (this.options.truncate) this.truncate(); 100 101 return { 102 $element: this.$element, 103 size: this.fontSize 104 }; 105 }; 106 107 Quickfit.prototype.calculateFontSize = function () { 108 var letter, textWidth, i; 109 110 textWidth = 0; 111 for (i = 0; i < this.text.length; ++i) { 112 letter = this.text.charAt(i); 113 textWidth += this.quickfitHelper.getMeassure(letter); 114 } 115 116 this.targetFontSize = parseInt(this.options.width / textWidth); 117 return this.fontSize = Math.max(this.options.min, Math.min(this.options.max, this.targetFontSize)); 118 }; 119 120 Quickfit.prototype.truncate = function () { 121 var index, lastLetter, letter, textToAdd, textWidth; 122 123 if (this.fontSize > this.targetFontSize) { 124 textToAdd = ''; 125 textWidth = 3 * this.quickfitHelper.getMeassure('.') * this.fontSize; 126 127 index = 0; 128 while (textWidth < this.options.width && index < this.text.length) { 129 letter = this.text[index++]; 130 if (lastLetter) textToAdd += lastLetter; 131 textWidth += this.fontSize * this.quickfitHelper.getMeassure(letter); 132 lastLetter = letter; 133 } 134 135 if (textToAdd.length + 1 === this.text.length) { 136 textToAdd = this.text; 137 } else { 138 textToAdd += '...'; 139 } 140 this.textWasTruncated = true; 141 142 return this.$element.attr('data-quickfit', this.text).html(textToAdd); 143 144 } else { 145 if (this.previouslyTruncated) { 146 return this.$element.html(this.text); 147 } 148 } 149 }; 150 151 return Quickfit; 152 153 })(); 154 155 return $.fn.quickfit = function (options) { 156 var measurements = []; 157 158 // Separate measurements from repaints 159 // First calculate all measurements... 160 var $elements = this.each(function () { 161 var measurement = new Quickfit(this, options).fit(); 162 measurements.push(measurement); 163 return measurement.$element; 164 }); 165 166 // ... then apply the measurements. 167 for (var i = 0; i < measurements.length; i++) { 168 var measurement = measurements[i]; 169 170 measurement.$element.css({ fontSize: measurement.size + 'px' }); 171 } 172 173 return $elements; 174 }; 175 176})(jQuery, window); 177 178(function () { 179 jQuery.browser.msie = false; 180 jQuery.browser.version = 0; 181 if (navigator.userAgent.match(/MSIE ([0-9]+)\./)) { 182 jQuery.browser.msie = true; 183 jQuery.browser.version = RegExp.$1; 184 } 185})(); 186jQuery.fn.extend({ 187 live: function (event, callback) { 188 if (this.selector) { 189 jQuery(document).on(event, this.selector, callback); 190 } 191 } 192}); 193function getParameterByName(name, url) { 194 if (!url) url = window.location.href; 195 name = name.replace(/[\[\]]/g, "\\$&"); 196 var regex = new RegExp("[?&]" + name + "(=([^&#]*)|&|#|$)"), 197 results = regex.exec(url); 198 if (!results) return null; 199 if (!results[2]) return ''; 200 return decodeURIComponent(results[2].replace(/\+/g, " "));
201} 202//#region bootstrap collapse extention 203!function ($) { 204 "use strict" 205 var Collapse = function (element, options) { 206 this.$element = $(element) 207 this.options = $.extend({}, $.fn.collapse.defaults, options) 208 209 if (this.options["parent"]) { 210 this.$parent = $(this.options["parent"]) 211 } 212 213 this.options.toggle && this.toggle() 214 } 215 216 Collapse.prototype = { 217 218 constructor: Collapse 219 220 , dimension: function () { 221 var hasWidth = this.$element.hasClass('width') 222 return hasWidth ? 'width' : 'height' 223 } 224 225 , show: function () { 226 var dimension = this.dimension() 227 , scroll = $.camelCase(['scroll', dimension].join('-')) 228 , actives = this.$parent && this.$parent.find('.in') 229 , hasData 230 if (this.$parent.attr("data-collapse-type") !== "manual" && actives && actives.length) { 231 hasData = actives.data('collapse') 232 actives.collapse('hide') 233 hasData || actives.data('collapse', null) 234 } 235 236 this.$element[dimension](0) 237 this.transition('addClass', 'show', 'shown') 238 this.$element[dimension](this.$element[0][scroll]); 239 if ($('[data-parent=#' + $(this.$element).attr('id') + ']').length > 0) { 240 $('[data-parent=#' + $(this.$element).attr('id') + ']').find('span.fa-plus').removeClass('fa-plus').addClass('fa-minus'); 241 } 242 243 } 244 245 , hide: function () { 246 var dimension = this.dimension() 247 this.reset(this.$element[dimension]()) 248 this.transition('removeClass', 'hide', 'hidden') 249 this.$element[dimension](0); 250 if ($('[data-parent=#' + $(this.$element).attr('id') + ']').length > 0) { 251 $('[data-parent=#' + $(this.$element).attr('id') + ']').find('span.fa-minus').removeClass('fa-minus').addClass('fa-plus'); 252 } 253 254 255 } 256 257 , reset: function (size) { 258 var dimension = this.dimension() 259 260 this.$element 261 .removeClass('collapse') 262 [dimension](size || 'auto') 263 [0].offsetWidth 264 265 this.$element[size ? 'addClass' : 'removeClass']('collapse') 266 267 return this 268 } 269 270 , transition: function (method, startEvent, completeEvent) { 271 var that = this 272 , complete = function () { 273 if (startEvent == 'show') that.reset() 274 that.$element.trigger(completeEvent) 275 } 276 277 this.$element 278 .trigger(startEvent) 279 [method]('in') 280 281 $.support.transition && this.$element.hasClass('collapse') ? 282 this.$element.one($.support.transition.end, complete) : 283 complete() 284 } 285 286 , toggle: function () { 287 this[this.$element.hasClass('in') ? 'hide' : 'show']() 288 } 289 290 } 291 292 $.fn.collapse = function (option) { 293 return this.each(function () { 294 var $this = $(this) 295 , data = $this.data('collapse') 296 , options = typeof option == 'object' && option 297 if (!data) $this.data('collapse', (data = new Collapse(this, options))) 298 if (typeof option == 'string') data[option]() 299 }) 300 } 301 302 $.fn.collapse.defaults = { 303 toggle: true 304 } 305 306 $.fn.collapse.Constructor = Collapse 307 308 $(function () { 309 $('body').on('click.collapse.data-api', '[data-toggle=collapse]', function (e) { 310 var $this = $(this), href 311 , target = $this.attr('data-target') 312 || e.preventDefault() 313 || (href = $this.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '') 314 , option = $(target).data('collapse') ? 'toggle' : $this.data() 315 $(target).collapse(option) 316 }) 317 }) 318 319}(window.jQuery); 320if (typeof $.widget !== typeof undefined) { 321 322 try { 323 324 $.widget("custom.combobox", { 325 _create: function () { 326 this.wrapper = $("<span>") 327 .addClass("custom-combobox") 328 .insertAfter(this.element); 329 330 this.element.hide(); 331 this._createAutocomplete(); 332 this._createShowAllButton(); 333 }, 334 335 _createAutocomplete: function () { 336 var selected = 337 this.element.children(":selected"), 338 value = "", //selected.val() ? selected.text() : 339 placeholder = this.element.attr('placeholder'); 340 this.input = $("<input>") 341 .appendTo(this.wrapper) 342 .val(value) 343 .attr("title", "") 344 .attr("placeholder", placeholder) 345 .addClass("custom-combobox-input ui-widget ui-widget-content ui-state-default ui-corner-left") 346 .autocomplete({ 347 delay: 0, 348 minLength: 0, 349 source: $.proxy(this, "_source") 350 }) 351 .tooltip({ 352 classes: { 353 "ui-tooltip": "ui-state-highlight" 354 } 355 }); 356 357 this._on(this.input, { 358 359 autocompleteselect: function (event, ui) { 360 ui.item.option.selected = true; 361 this._trigger("select", event, { 362 item: ui.item.option 363 }); 364 }, 365 366 autocompletechange: "_removeIfInvalid", 367 change: function (event, ui) { 368 this._trigger("changed", event, { 369 370 value: this.input.val() 371 }); 372 } 373 }); 374 }, 375 376 _createShowAllButton: function () { 377 var input = this.input, 378 wasOpen = false; 379 380 $("<a>") 381 .attr("tabIndex", -1) 382 .attr("title", "Show All Items") 383 .tooltip() 384 .appendTo(this.wrapper) 385 .button({ 386 icons: { 387 primary: "ui-icon-triangle-1-s" 388 }, 389 text: false 390 }) 391 .removeClass("ui-corner-all") 392 .addClass("custom-combobox-toggle ui-corner-right") 393 .on("mousedown", function () { 394 wasOpen = input.autocomplete("widget").is(":visible"); 395 }) 396 .on("click", function () { 397 input.trigger("focus"); 398 399 // Close if already visible 400 if (wasOpen) { 401 return; 402 } 403 404 // Pass empty string as value to search for, displaying all results 405 input.autocomplete("search", ""); 406 }); 407 }, 408 409 _source: function (request, response) { 410 var matcher = new RegExp($.ui.autocomplete.escapeRegex(request.term), "i"); 411 response(this.element.children("option").map(function () { 412 var text = $(this).text(); 413 if (this.value && (!request.term || matcher.test(text))) 414 return { 415 label: text, 416 value: text, 417 option: this 418 }; 419 })); 420 }, 421 422 _removeIfInvalid: function (event, ui) { 423 return; 424 // Selected an item, nothing to do 425 if (ui.item) { 426 return; 427 } 428 429 // Search for a match (case-insensitive) 430 var value = this.input.val(), 431 valueLowerCase = value.toLowerCase(), 432 valid = false; 433 this.element.children("option").each(function () { 434 if ($(this).text().toLowerCase() === valueLowerCase) { 435 this.selected = valid = true; 436 return false; 437 } 438 }); 439 440 // Found a match, nothing to do 441 if (valid) { 442 return; 443 } 444 445 // Remove invalid value 446 this.input 447 .val("") 448 .attr("title", value + " didn't match any item") 449 .tooltip("open"); 450 this.element.val(""); 451 this._delay(function () { 452 this.input.tooltip("close").attr("title", ""); 453 }, 2500); 454 this.input.autocomplete("instance").term = ""; 455 }, 456 457 _destroy: function () { 458 this.wrapper.remove(); 459 this.element.show(); 460 } 461 }); 462 } catch (err) { 463 console.log(err); 464 } 465 466} 467 468var isIE = function () { 469 if (navigator.appName === "Microsoft Internet Explorer") { 470 return true; 471 } else if (navigator.appName === "Netscape" && /Trident/.test(navigator.userAgent)) { // IE 11 472 return true; 473 } 474 return false; 475}, 476 isFF = function () { 477 return !!navigator.userAgent.match(/firefox/i); 478 }, 479 is_chrome = is_chrome = /chrome/i.test(navigator.userAgent); 480 481Array.prototype.random = function (length) { 482 return this[Math.floor((Math.random() * length))]; 483} 484$(document).ready(function () { 485 $('#setting-container').find('.item').each(function (index) { 486 if ($.trim($(this).html()) == '') 487 $(this).hide(); 488 });
489 490 //$('#ctl00_PageContent_btnAddCreditCard').remove(); 491 //$('#userbilingtab').prev().remove(); 492 // $('#ctl00_HyperLink11433').attr('href','Notification.aspx?t=main'); 493 // $('#ctl00_linkClientStats').parents('li').first().hide(); 494 if ($('#apiCon').length > 0) { 495 $('#apiCon').find('div.panel-collapse').removeClass('in'); 496 // new services().get_api(createList, onErrorApi); 497 var regExp = /\(([string|int| string|DateTime|Boolean|int\[\]|date| String|String]+)\)/; 498 499 $('#apiCon').delegate('#code-examples li a[data-toggle]', 'click', function () { 500 $('#apiCon #code-examples li').removeClass('active'); 501 $(this).parents('li').first().addClass('active'); 502 $(this).parents('ul').first().next().find('.tab-pane').removeClass('active').removeClass('in'); 503 $(this).parents('ul').first().next().find($(this).attr('href')).addClass('active').addClass('in'); 504 }); 505 506 507 508 $('#apiCon').delegate('ul.api_selection li a, a.api_root,a.acountWebService', 'click', function () { 509 $('#apiCon').find('ul.api_selection li').removeClass('active'); 510 $('#apiCon').find('a[class*=con_api]').removeClass('active'); 511 if ($(this).is('a.acountWebService')) { 512 $('#collapseOne').find('ul.api_selection').first().parents('div.panel-collapse').first().removeClass('in'); 513 $('#collapseTwo').find('ul.api_selection').first().parents('div.panel-collapse').first().removeClass('in'); 514 $(this).addClass('active'); 515 $(this).parents('div.panel-collapse').prev().find('a.api_root').addClass('active'); 516 //var top1Text = $(this).parents('div.panel').last().find('a.api_root').first().addClass('active').text(); 517 //$('#top2').html($(this).text()); 518 //$('#top1').html(top1Text); 519 //$('#top3').html(''); 520 $('#top_api_menu').html('<span class="active">API DEVELOPER TOOLS</span>/<span class="active">' + $(this).parents('div.panel-collapse').first().prev().text() + '</span>/<span class="active">' + $(this).text() + '</span>'); 521 } else { 522 var content = ''; 523 if ($(this).is('a.api_root')) { 524 content = $(this).next().val(); 525 } else { 526 content = $(this).next().html(); 527 } 528 var html = content.split('|||')[0]; 529 var link = content.split('|||')[1]; 530 var title = content.split('|||')[2]; 531 $('#ability-details').html(html); 532 //if (link.length > 0) { 533 // $('#api_download').show(); 534 // $('#api_download').attr('href', link.replace(/~\//, '/').replace(/ /, '')); 535 // if (title.length > 0) { 536 // $('#api_download').attr('download', title + '.pdf'); 537 // } 538 //} else { 539 // $('#api_download').hide(); 540 //} 541 if (typeof title !== typeof undefined && title.length > 0) { 542 $('#api_header').html('<h3>' + title + '</h3>'); 543 } else { 544 $('#api_header').html(''); 545 } 546 547 $('#ability-details').find('p span,p font').filter(function () { 548 return $(this).parents('font').length == 0 && $(this).text().match(regExp) 549 }).each(function () { 550 $(this).css({ 'display': 'list-item', 'list-style': 'outside url("/images/small-msg.png") none' }); 551 }); 552 553 var target = $(this).parents('ul').first().attr('id'); 554 var serType = $(this).parents('div.panel-collapse').first().prev().find('a.acountWebService'); 555 var serTypeLast = $(this).parents('div.panel-collapse').last().prev().find('a.api_root'); 556 serType.addClass('active'); 557 serTypeLast.addClass('active'); 558 var headerHtml = '<span class="active">API DEVELOPER TOOLS</span>'; 559 //Only if method click add active class to element and parent container prev 560 if ($(this).is('ul.api_selection li a')) { 561 var isDirect = $(this).parents('#collapseOne').length == 0; 562 //Account Web Service or DirectSend - add class active 563 $(this).parents('li').first().addClass('active'); 564 headerHtml += '/<span class="active">' + serTypeLast.text() + '</span>/<span class="active">' + serType.text() + '</span>/<span class="active">' + $(this).text() + '</span>'; 565 $('#apiCon').find('a.' + $(this).parents('ul').first().data('class-active')).addClass('active'); 566 $('#code-examples').find('#form-action').text('action="http://www.pulseem.com/Pulseem/' + (isDirect ? 'PulseemSendServices' : 'PulseemServices') + '.asmx/' + $.trim(title) + '"'); 567 var inputParams = ''; 568 var formManupulation = "var form = $('<form/>').attr('action','http://www.pulseem.com/Pulseem/" + (isDirect ? 'PulseemSendServices' : 'PulseemServices') + ".asmx/" + $.trim(title) + "');<br/>
568var params_inputs="; 569 var aspnetparams = '', paramsinsideservice = ''; 570 var phpparams = '$wsdl_url = ' + "'http://www.pulseem.com/Pulseem/" + (isDirect ? 'PulseemSendServices' : 'PulseemServices') + ".asmx?wsdl';<br/>$client = new SOAPClient($wsdl_url);<br/>$params = array(<br/><span style='padding:0px 25px; display:inline-block;'>"; 571 var javaparms = 'String <span class="brownjava">getURL</span> = <span class="bluejava">"http://www.pulseem.com/Pulseem/' + (isDirect ? 'PulseemSendServices' : 'PulseemServices') + '.asmx/' + $.trim(title) + '"</span>;<br/>HttpGet <span class="brownjava">get</span> = <span class="purplejava">new</span> HttpGet(<span class="brownjava">getURL</span>);<br/>' + 572 'URI <span class="brownjava">uri</span> = <span class="purplejava">new</span> URIBuilder(<span class="brownjava">get</span>.getURI())<br/>'; 573 574 $('#ability-details').find('span.param').each(function (i, ev) { 575 if ($(this).is('.password')) { 576 inputParams += '<input type="hidden" name="' + $(this).text().split('(')[0] + '" value="[your parameter value]" /><br/>'; 577 } else { 578 inputParams += '<input type="text" name="' + $(this).text().split('(')[0] + '" value="[your parameter value]" /><br/>'; 579 } 580 581 formManupulation += '\'' + '<input type="text" name="' + $(this).text().split('(')[0] + '" value="[your parameter value]" />' + '\'+<br/>'; 582 if (i == 0) { 583 formManupulation += '<span style="padding:0px 25px; display:inline-block;">'; 584 javaparms += '<span style="padding:0px 25px; display:inline-block;">'; 585 } 586 aspnetparams += get_aspnet_html_var($.trim($(this).text().split('(')[1].split(')')[0])) + ' <span class="name">' + $(this).text().split('(')[0] + '</span> = [Your Parameter Value];<br/>'; 587 paramsinsideservice += '<span class="name">' + $(this).text().split('(')[0] + '</span>, '; 588 phpparams += "'" + $(this).text().split('(')[0] + '\' => \'[Your Parameter Value]\',<br/>'; 589 javaparms += '.addParameter(<span class="bluejava">"' + $(this).text().split('(')[0] + '"</span>, <span class="bluejava">"[Your Parameter Value]"</span>)<br/>'; 590 591 }); 592 593 phpparams = phpparams.substring(0, phpparams.length - 6) + '</span><br/>);<br/>'; 594 phpparams += '$result = $client->' + $.trim(title) + '($params);<br/>'; 595 phpparams += 'echo $result->' + $(this).text().split('(')[0] + 'Result;'; 596 paramsinsideservice = paramsinsideservice.substring(0, paramsinsideservice.length - 2); 597 javaparms += '.build();</span>' 598 formManupulation = formManupulation.substring(0, formManupulation.length - 6) + ';</span><br/>'; 599 formManupulation += "form.html(params_inputs).appendTo('body').submit();"; 600 inputParams += '<input type="submit" value="Submit" />'; 601 var rtnPar = $('#ability-details').find('.return-parameter').data('param-type'); 602 if (rtnPar != 'undefined' && rtnPar != 'void') { 603 aspnetparams += get_aspnet_html_var(rtnPar) + ' result = '; 604 } 605 aspnetparams += 'proxy.' + $.trim(title) + '(' + paramsinsideservice + ');'; 606 $('#input-params').html(inputParams); 607 $('#form-manupulation').html(formManupulation); 608 $('#aspnetparams').html(aspnetparams); 609 $('#phpparams').html(phpparams); 610 $('#javaparams').html(javaparms); 611 if (isDirect) { 612 $('#footerParamsDesc').html($('#footerParamsDesc').html().replace(/PulseemServices.asmx/g, 'PulseemSendServices.asmx')); 613 $('#pulseemaspservice').find('span.serviceProxy').html('PulseemSendServices'); 614 } else { 615 $('#footerParamsDesc').html($('#footerParamsDesc').html().replace(/PulseemSendServices.asmx/g, 'PulseemServices.asmx')); 616 $('#pulseemaspservice').find('span.serviceProxy').html('PulseemServices'); 617 } 618 // 619 620 } else { 621 headerHtml += '/<span class="active">' + $(this).text() + '</span>' 622 $(this).addClass('active'); 623 } 624 625 626 $('#top_api_menu').html(headerHtml) 627 628 629 630
631 //$('#top1').html(serTypeLast.text()); 632 //$('#top2').html(serType.text()); 633 // $('#api').find('a.' + target).addClass('active'); 634 // $('#top1').html($('#api').find('a.' + target).first().text()); 635 // $('#top2').html($('#api').find('a.' + target).last().text()); 636 //$('#top3').removeClass('hideClass').html($(this).text()); 637 } 638 639 640 641 642 }); 643 //var content_first = $('#ctl00_ContentPlaceHolder1_Api1_hdnOpt11').val(); 644 //var html_first = content_first.split('|||')[0]; 645 //var link_first = content_first.split('|||')[1]; 646 //var title_first = content_first.split('|||')[2]; 647 //$('#ability-details').html(html_first); 648 //$('#api_header').html('<h3>' + title_first + '</h3>'); 649 //$('#api_download').attr({ 'href': link_first.replace(/~\//, '/').replace(/ /, ''), 'download': title_first + '.pdf' }); 650 651 } 652 if ($('#step-container').length > 0) { 653 $('#step-container').show(); 654 } 655 if ($('#alert').length == 0 && typeof closeText !== typeof undefined) 656 $('body').append('<div class="custom-modal alert" id="alert">' + 657 '<div class="custom-modal-content" style="width: 570px;">' + 658 '<div class="pop-up-header">' + 659 ' <div class="pop-up-icon">' + 660 ' <div class="insideIcon icon icon-settings-4"></div>' + 661 ' </div>' + 662 ' <div class="pop-up-title"></div>' + 663 ' <div class="pop-up-close" onclick="closecustommodal();"><i class="fa fa-times" aria-hidden="true"></i></div>' + 664 '</div>' + 665 '<div style="padding: 20px;" class="pop-up-content">' + 666 ' <div id="content-alert" style="padding: 8px 93px 32px 0px;">' + 667 ' <div class="font-size30" id="titlealert"> </div>' + 668 ' <div id="bodyalert" class="graycolor" style="font-size: 20px;"> </div>' + 669 ' </div>' + 670 '</div>' + 671 '<div class="buttons center" style="justify-content: center; width: 100%;">' + 672 ' <div class="actionButton" onclick="closecustommodal();">' + 673 ' <div class="insideText">' + closeText + '</div>' + 674 ' </div>' + 675 '</div>' + 676 '</div>' + 677 '</div>'); 678 $('body').css('background', 'transparent'); 679 $('.custom-modal:not(.password)').each(function () { 680 if ($(this).find('.closemodal').length == 0 && $(this).find('div.quarter-circle-top-right').length > 0) { 681 $(this).find('div.quarter-circle-top-right').first().next().prepend('<div class="closemodal" onclick="closecustommodal();" style="margin-bottom:-13px;"><i class="fa fa-times" aria-hidden="true"></i></div>'); 682 } 683 }); 684 685 if ($('body').css('direction') == 'ltr' && is_chrome) { 686 //if (isFF()) { 687 // $('body, #step-container').addClass('originTopRight'); 688 //} else { 689 690 //} 691 $('body, #step-container').addClass('originTopLeft'); 692 693 } else if ($('body').css('direction') == 'rtl' && is_chrome) { 694 //if (isFF()) { 695 // $('body, #step-container').addClass('originTopLeft'); 696 //} else { 697 698 //} 699 $('body, #step-container').addClass('originTopRight'); 700 701 } 702 if ((window.location.href.indexOf('CampaignStatistics.aspx') > -1) || window.location.href.indexOf('GraphReport.aspx') > -1 || window.location.href.indexOf('CampaignEdit.aspx') > -1) { 703 return; 704 } 705 new MutationObserver(function (mutations) { 706 mutations.some(function (mutation) { 707 if (mutation.type === 'attributes' && mutation.attributeName === 'src') { 708 //console.log(mutation); 709 if ((window.location.href.indexOf('CampaignEdit') > -1 && window.location.href.indexOf('CampaignEdit.aspx') == -1) || window.location.href.indexOf('NewFormEdit') > -1 || window.location.href.indexOf('FacebookManagmentPage') > -1) { 710 return; 711 } 712 $('iframe').each(function () { 713 // $(this).css({ 'background': '' }).contents().find('body').css('opacity', '0'); 714 }); 715 return true; 716 } 717 718 return false; 719 }); 720 }).observe(document.body, { 721 attributes: true, 722 attributeFilter: ['src'], 723 attributeOldValue: true, 724 characterData: false, 725 characterDataOldValue: false, 726 childList: false, 727 subtree: true 728 });
729 730 // $('.ImageManager').click(function(){ 731 // alert(9); 732 // console.log($('#RadWindowWrapper_ctl00_PageContent_editEditor_editEditor_dialogOpenerImageManager').length); 733 // }); 734 735 // $('#RadWindowWrapper_ctl00_PageContent_editEditor_editEditor_dialogOpenerImageManager').load(function(){ 736 // var src = $('#RadWindowWrapper_ctl00_PageContent_editEditor_editEditor_dialogOpenerImageManager').attr('src'); 737 // src = src + '&iframe=true'; 738 // $('#RadWindowWrapper_ctl00_PageContent_editEditor_editEditor_dialogOpenerImageManager').attr('src',src); 739 // }); 740 // if($('.ImageManager .rrbToggleButton').length>0) { 741 // console.log(999); 742 743 // } 744 745 746}); 747// // $(document).on("click", ".ImageManager *", function() { 748// // alert(0); //THIS WORKS! 749// // }); 750function setGridCss() { 751 var counter = 0; 752 753 $('table:not(.billingGrid) > tbody > tr:visible:not(table > tbody > tr table > tbody > tr)').each(function (index) { 754 $(this).css('background', ''); 755 //console.log($(this).parents('table').first().attr('id') + '- index:' + index); 756 if ($(this).is(':first-child') || ($(this).is(':nth-child(2)') && !$(this).prev().is('visible'))) { 757 counter = 0; 758 } 759 if (counter % 2 == 0) { 760 $(this).addClass('odd').removeClass('even'); 761 } else { 762 $(this).addClass('even').removeClass('odd'); 763 } 764 counter++; 765 }); 766} 767$.fn.enterKey = function (fnc) { 768 return this.each(function () { 769 $(this).keypress(function (ev) { 770 var keycode = (ev.keyCode ? ev.keyCode : ev.which); 771 if (keycode == '13') { 772 fnc.call(this, ev); 773 } 774 }) 775 }) 776} 777function setEvents() { 778 if ($('#ctl00_PageContent_lnkSearch').length > 0 && $('.searchWithEnter').length > 0) { 779 $('.searchWithEnter input[type=text]').each(function () { 780 $(this).enterKey(function (e) { 781 if ($('#ctl00_PageContent_hdnStartIndex').length > 0) { 782 $('#ctl00_PageContent_hdnStartIndex').val("0"); 783 } 784 $('#ctl00_PageContent_lnkSearch').trigger('click'); 785 if ($('#ctl00_PageContent_lnkSearch').attr('href').indexOf('ctl00$PageContent$lnkSearch') > -1) { 786 __doPostBack('ctl00$PageContent$lnkSearch', ''); 787 } else if ($('#ctl00_PageContent_lnkSearch').attr('href').indexOf('ctl00$PageContent$btnSearch') > -1) { 788 789 __doPostBack('ctl00$PageContent$btnSearch', ''); 790 } 791 }); 792 }); 793 794 } else 795 if ($('#ctl00_PageContent_btnSearch').length > 0 && $('.searchWithEnter').length > 0) { 796 $('.searchWithEnter input[type=text]').each(function () { 797 $(this).enterKey(function () { 798 if ($('#ctl00_PageContent_hdnStartIndex').length > 0) { 799 $('#ctl00_PageContent_hdnStartIndex').val("0"); 800 } 801 $('#ctl00_PageContent_btnSearch').trigger('click'); 802 if ($('#ctl00_PageContent_btnSearch').attr('href').indexOf('ctl00$PageContent$btnSearch') > -1) { 803 804 __doPostBack('ctl00$PageContent$btnSearch', ''); 805 } 806 }); 807 }); 808 809 } 810 811} 812$(window).load(function (e) { 813 814 //var size=0; 815 //$('[style*=font-size]').each(function () { 816 // size = parseInt($(this).css('font-size')); 817 // $(this).css('font-size', size + 2 + 'px'); 818 //}); 819 $('form').show(); 820 821 $('#AuthConfrimCodeEmail #txtAuthConfirmCode').keypress(function(event){ 822 var keycode = (event.keyCode ? event.keyCode : event.which); 823 if(keycode == '13'){ 824 $('#AuthConfrimCodeEmail div.AuthButton').trigger('click'); 825 return false; 826 } 827 }); 828 829 $('#BO_divAuthConfrimCode #BO_txtAuthConfirmCode').keypress(function(event){ 830 var keycode = (event.keyCode ? event.keyCode : event.which); 831 if(keycode == '13'){ 832 $('#BO_divAuthConfrimCode div.AuthButton').trigger('click'); 833 return false; 834 } 835 }); 836 //Main Popup 837 //var pieces = 70, 838 // speed = 1, 839 // pieceW = 30, 840 // pieceH = 30; 841 842 843 //for (var i = pieces - 1; i >= 0; i--) { 844 // $('#pulseempopup').prepend('<div class="piece" style="width:' + pieceW + 'px; height:' + pieceH + 'px"></div>'); 845 //}; 846 847 //function breakGlass(from) { 848 // if (from === "pulseemreverse") { 849 // $('.piece').each(function () { 850 // TweenLite.to($(this), speed, { x: 0, y: 0, rotationX: 0, rotationY: 0, opacity: 1, z: 0 }); 851 // TweenLite.to($('#pulseempopup h1'), 0.2, { opacity: 1, delay: speed }); 852 // }); 853 // return; 854 // } 855 856 // if (!from) { 857 // TweenLite.to($('#pulseempopup h1'), 0.2, { opacity: 0 }); 858 // } else { 859 // TweenLite.from($('#pulseempopup h1'), 0.5, { opacity: 0, delay: speed }); 860 // } 861 862 // $('.piece').each(function () { 863 // var distX = getRandomArbitrary(-250, 250), 864 // distY = getRandomArbitrary(-250, 250), 865 // rotY = getRandomArbitrary(-720, 720), 866 // rotX = getRandomArbitrary(-720, 720), 867 // z = getRandomArbitrary(-500, 500); 868 869 // if (!from) { 870 // TweenLite.to($(this), speed, { x: distX, y: distY, rotationX: rotX, rotationY: rotY, opacity: 0, z: z }); 871 // } else { 872 // TweenLite.from($(this), speed, { x: distX, y: distY, rotationX: rotX, rotationY: rotY, opacity: 0, z: z }); 873 // } 874 // });
875 //} 876 877 //function getRandomArbitrary(min, max) { 878 // return Math.random() * (max - min) + min; 879 //} 880 881 882 //$('.piece, h1').click(function () { 883 // breakGlass(); 884 //}); 885 //$('.pulseemreverse').click(function () { 886 // breakGlass('pulseemreverse'); 887 //}); 888 889 //breakGlass(true); 890 891 892 893 894 setTimeout(function () { 895 setEvents(); 896 }, 2000); 897 setGridCss(); 898 899 $('.titletab').on('click', function (e) { 900 setGridCss(); 901 }); 902 903 if ($('[data-toggle="tooltip"]').length > 0) { 904 905 $('[data-toggle]:not([data-placement])').attr('data-placement', $('body').hasClass('bodyltr') ? 'right' : 'left'); 906 $('[data-toggle="tooltip"]').tooltip(); 907 } 908 909 $('#loadOverlay').remove(); 910 if (is_chrome) { 911 $('body').addClass('chrome'); 912 } else if (isFF()) { 913 $('body').addClass('ff'); 914 } else { 915 $('body').addClass('ie'); 916 } 917 var iconsTimeDate = $('.fa-calendar, .fa-clock-o'); 918 if (iconsTimeDate.length > 0) { 919 iconsTimeDate.each(function () { 920 $(this).addClass('pointer').on('click', function (e) { 921 $(this).prev().focus(); 922 }); 923 924 }); 925 } 926 927 $('body').delegate('#toggletrigger', 'click', function () { 928 if ($('#step-container.navbar-fixed-bottom').length > 0) { 929 if ($('#step-container').hasClass('down')) { 930 $('#step-container').find('.fa.fa-plus').removeClass('fa-plus').addClass('fa-minus'); 931 $('#step-container').removeClass('down').animate({ bottom: '0px' }, 300, function () { 932 //callback 933 }); 934 } else { 935 $('#step-container').find('.fa.fa-minus').removeClass('fa-minus').addClass('fa-plus'); 936 937 $('#step-container').addClass('down').animate({ bottom: -$('#step-container')[0].getBoundingClientRect().height + 'px' }, 300, function () { 938 }); 939 } 940 // $('#step-container').slideToggle(); 941 } 942 }); 943 try { 944 // if (!(window.location.href.indexOf('FacebookManagmentPage')==-1)) { 945 $('iframe').each(function () { 946 $(this).css({ 'background': 'none' }).addClass('test').contents().find('body').css('opacity', '1'); 947 $(this).load(function () { 948 //resizeIframe(this); 949 var counter = 0; 950 $(this).css({ 'background': 'none' }).addClass('test').contents().find('body').css('opacity', '1'); 951 $('body').show(); 952 if ($(this).contents().find('body').find('table.grid').length > 0) { 953 $(this).contents().find('body').find('table.grid > tbody > tr:visible:not(table > tbody > tr table > tbody > tr)').each(function (index) { 954 $(this).css('background', ''); 955 if ($(this).is(':first-child') || ($(this).is(':nth-child(2)') && !$(this).prev().is('visible'))) { 956 counter = 0; 957 } 958 if (counter % 2 == 0) { 959 $(this).addClass('odd').removeClass('even'); 960 } else { 961 $(this).addClass('even').removeClass('odd'); 962 } 963 counter++; 964 }); 965 } 966 967 }); 968 969 }); 970 // } 971 972 } catch (err) { 973 974 } 975 976 977 978 if ($('body').hasClass('bodyltr') && ($('[class*=arrow-left]').length > 0 || $('[class*=arrow-right]').length > 0)) { 979 $('[class*=arrow-right]:not(.tempright)').each(function () { 980 $(this).attr('class', $(this).attr('class').replace(/arrow-right/g, 'arrow-left')).addClass('templeft'); 981 }); 982 $('[class*=arrow-left]:not(.templeft)').each(function () { 983 $(this).attr('class', $(this).attr('class').replace(/arrow-left/g, 'arrow-right')).addClass('tempright'); 984 }); 985 986 } 987 if ($('body').hasClass('bodyltr') && $('div.glyphicon-chevron-left').length > 0) { 988 $('div.glyphicon-chevron-left').removeClass('glyphicon-chevron-left').addClass('glyphicon-chevron-right'); 989 } 990 991 $('#top-menu').css('box-sizing', 'content-box'); 992 if ($('div.talk-bubble > div.talktext').length > 0) { 993 $('div.talk-bubble > div.talktext').slimScroll({ 994 height: '268px;', 995 distance: '-7px' 996 }); 997 } 998 999 $('.hasDatepicker, .hasTimepicker').on('focus', function () { 1000 1001 if (basePage.scale != 1 && !$('body').hasClass('homepage')) { 1002 var left = ($(this).offset().left / basePage.scale).toFixed(3); 1003 var top = ($(this).offset().top / basePage.scale + $(this).height() / basePage.scale).toFixed(3); 1004 $('#ui-datepicker-div, #ui-timepicker-div').css({ 'top': top + 'px', 'left': left + 'px' }); 1005 } 1006 });
1007 1008 if ($('header a.pulseemAppBarLogo.logo').find('img.appBarLogo[src*="SIMPLEMAIL_LOGO"]').length > 0) { 1009 $('header a.pulseemAppBarLogo.logo').css('background', 'none'); 1010 } 1011 //alert($('#ui-datepicker-div').length); 1012 //console.log(culture); 1013 //if ($('#ui-datepicker-div').length > 0) { 1014 // var options = $.extend( 1015 // {}, // empty object 1016 // $.datepicker.regional['he'], // Dynamically 1017 // { dateFormat: "dd/mm/yy" } // your custom options 1018 // ); 1019 // $.datepicker.setDefaults(options); 1020 1021 //} 1022 //var elements = { 1023 // top: $('#selector-top'), 1024 // left: $('#selector-left'), 1025 // right: $('#selector-right'), 1026 // bottom: $('#selector-bottom') 1027 //}; 1028 1029 //$(document).mousemove(function (event) { 1030 // if (event.target.id.indexOf('selector') !== -1 || event.target.tagName === 'BODY' || event.target.tagName === 'HTML') return; 1031 1032 // var $target = $(event.target); 1033 // if ($target.is('body') || $target.is('form ')) return; 1034 // if (typeof $target.attr('id') === typeof undefined) { 1035 // $target = $target.closest('[id]').first(); 1036 // } 1037 1038 // targetOffset = $target[0].getBoundingClientRect(), 1039 // targetHeight = targetOffset.height, 1040 // targetWidth = targetOffset.width; 1041 1042 // console.log($target); 1043 1044 // elements.top.css({ 1045 // left: (targetOffset.left - 4), 1046 // top: (targetOffset.top - 4), 1047 // width: (targetWidth + 5), 1048 // height: (targetHeight + 5) 1049 // }); 1050 // //elements.bottom.css({ 1051 // // top: (targetOffset.top + targetHeight + 1), 1052 // // left: (targetOffset.left - 3), 1053 // // width: (targetWidth + 4), 1054 // // height: (targetHeight + 5) 1055 // //}); 1056 // //elements.left.css({ 1057 // // left: (targetOffset.left - 5), 1058 // // top: (targetOffset.top - 4), 1059 // // height: (targetHeight + 8), 1060 // // width: (targetWidth + 5) 1061 // //}); 1062 // //elements.right.css({ 1063 // // left: (targetOffset.left + targetWidth + 1), 1064 // // top: (targetOffset.top - 4), 1065 // // height: (targetHeight + 8), 1066 // // width: (targetWidth + 5) 1067 // //}); 1068 1069 //}); 1070 $('#top-menu > #item-container > .item').on('click', function (e) { 1071 if (e.target !== this) 1072 return; 1073 window.location.href = $(this).find('a').first().attr('href'); 1074 if ($(this).find('a').first().trigger('click')); 1075 }); 1076 1077 //$("form[action*=Automations] [id=automationIdValue]").parent().prev().find('span').text(function () { 1078 // return $(this).text().replace("××§××", "× ××¢× ××"); 1079 //}); 1080}); 1081 1082function get_aspnet_html_var(type) { 1083 var isArr = type.indexOf('[') > -1, arr = ''; 1084 1085 if (isArr) { 1086 type = type.split('[')[0]; 1087 arr = '[]'; 1088 } 1089 1090 switch (type) { 1091 case 'dateTime': 1092 return '<span class="lightblueasp">DateTime</span>' + arr; 1093 case 'table': 1094 return '<span class="lightblueasp">DateTable</span>' + arr; 1095 case 'boolean': 1096 return '<span class="blueasp">bool</span>' + arr; 1097 case 'xml': 1098 return '<span class="lightblueasp">Xml</span>' + arr; 1099 default: return '<span class="blueasp">' + type + '</span>' + arr; 1100 } 1101 1102 1103} 1104 1105function copy2Clip(text, copyClipText, el) { 1106 $('<div class="copyLinkDiv">' + copyClipText + '</div>').insertAfter($(el).parents('h3').first()).fadeOut(5000, function () { 1107 1108 $('.copyLinkDiv').remove(); 1109 }); 1110 if (window.clipboardData && window.clipboardData.setData) { 1111 // IE specific code path to prevent textarea being shown while dialog is visible. 1112 return clipboardData.setData("Text", text); 1113 1114 } else if (document.queryCommandSupported && document.queryCommandSupported("copy")) { 1115 var textarea = document.createElement("textarea"); 1116 textarea.textContent = text; 1117 textarea.style.position = "fixed"; // Prevent scrolling to bottom of page in MS Edge. 1118 document.body.appendChild(textarea); 1119 textarea.select(); 1120 try { 1121 return document.execCommand("copy"); // Security exception may be thrown by some browsers. 1122 } catch (ex) { 1123 console.warn("Copy to clipboard failed.", ex); 1124 return false; 1125 } finally { 1126 document.body.removeChild(textarea); 1127 } 1128 } 1129 1130} 1131 1132var isInIFrame = (window.location != window.parent.location); 1133function alertMSG(title, msg, onOkClick) { 1134 1135 if ($('#alert').length == 0) { 1136 if (!isInIFrame) { 1137 const popupHtml = '<div class="custom-modal alert" id="alert">
1137' + 1138 '<div class="custom-modal-content" style="width: 570px;">' + 1139 '<div class="pop-up-header">' + 1140 ' <div class="pop-up-icon">' + 1141 ' <div class="insideIcon icon icon-settings-4"></div>' + 1142 ' </div>' + 1143 ' <div class="pop-up-title">' + title + '</div>' + 1144 ' <div class="pop-up-close" onclick="closecustommodal();"><i class="fa fa-times" aria-hidden="true"></i></div>' + 1145 '</div>' + 1146 '<div style="padding: 20px;" class="pop-up-content">' + 1147 ' <div id="content-alert" style="padding: 8px 93px 32px 0px;">' + 1148 ' <div id="bodyalert" class="graycolor" style="font-size: 20px;">' + msg + '</div>' + 1149 ' </div>' + 1150 '</div>' + 1151 '<div class="buttons center" style="justify-content: center; width: 100%;">' + 1152 ' <div class="actionButton" onclick="' + onOkClick ?? 'closecustommodal' + '();">' + 1153 ' <div class="insideText">' + closeText + '</div>' + 1154 ' </div>' + 1155 '</div>' + 1156 '</div>' + 1157 '</div>' 1158 1159 $('body').append(popupHtml); 1160 $('#alert').fadeIn(100); 1161 setTimeout(function () { 1162 $('#alert').show(); 1163 }, 100); 1164 } else { 1165 var iframe = $(window.parent.document.getElementsByTagName('iframe')); 1166 var alertWindow = $(window.parent.document.getElementById('alert')); 1167 alertWindow.find('#titlealert').html(title); 1168 alertWindow.find('#bodyalert').html(msg); 1169 alertWindow.fadeIn(100); 1170 if (onOkClick) { 1171 alertWindow.find('.closetext a').on('click', function (e) { 1172 onOkClick.call(this); 1173 }); 1174 } 1175 1176 if (iframe.parents('.custom-modal').length > 0) { 1177 iframe.parents('.custom-modal').css('z-index', '1'); 1178 } 1179 1180 } 1181 1182 } else { 1183 $('#titlealert').html(title); 1184 $('#bodyalert').html(msg); 1185 if (onOkClick) { 1186 $('#alert').find('.closetext a').on('click', function (e) { 1187 onOkClick; 1188 }); 1189 } 1190 $('#alert').fadeIn(100); 1191 1192 } 1193 1194 $('#fadebackground').fadeIn(100); 1195 1196 1197 1198 1199} 1200function resizeIframe(obj) { 1201 //if ((window.location.href.indexOf('CampaignStatistics.aspx') > -1) || window.location.href.indexOf('GraphReport.aspx') > -1) { 1202 // return; 1203 //} 1204 $(obj).css('height', 'auto').css('overflow-x', 'hidden'); 1205 obj.style.height = obj.contentWindow.document.body.scrollHeight + 'px'; 1206} 1207function isScrolledIntoView(elem) { 1208 var docViewTop = $(window).scrollTop(); 1209 var docViewBottom = docViewTop + $(window).height(); 1210 1211 var elemTop = $(elem).offset().top; 1212 var elemBottom = elemTop + $(elem).height(); 1213 1214 return ((elemBottom <= docViewBottom) && (elemTop >= docViewTop)); 1215} 1216function resizeframe(obj) { 1217 // var height = 0; 1218 // console.log(obj.contentWindow.document.body.scrollHeight); 1219 $(obj).css('height', 'auto').css('overflow-x', 'hidden'); 1220 obj.style.height = obj.contentWindow.document.body.scrollHeight + 'px'; 1221 1222 1223 var window = obj.contentWindow; 1224 var prevheight = jQuery(obj).attr('height'); 1225 var newheight = Math.max(window.document.body.scrollHeight, window.document.body.offsetHeight, window.document.documentElement.clientHeight, window.document.documentElement.scrollHeight, window.document.documentElement.offsetHeight); 1226 jQuery(obj).attr('min-height', newheight); 1227 // console.log("Adjusting iframe height for : " +prevheight+"px => "+newheight+"px"); 1228 1229 //console.log($(obj.contentWindow).height()); 1230 //console.log($(obj).contents().find('body').height()); 1231 //console.log($(obj).contents().find('body').outerHeight()); 1232 //console.log($(obj).contents().find('form').outerHeight()); 1233 //console.log(obj.contentWindow.document.body.offsetHeight + 20 + 'px'); 1234 //console.log(obj.contentWindow.document.body.scrollHeight + 20 + 'px'); 1235 //obj.style.height = obj.contentWindow.document.body.scrollHeight + 20 + 'px'; 1236 //if ($(obj).parents('.custom-modal-content').length > 0) { 1237 // $(obj).parents('.custom-modal-content').css('height', ''); 1238 //} 1239} 1240function resizeIframeTest(ifrm) { 1241 //$(ifrm).css('height', 'auto').css('overflow-x', 'hidden'); 1242 //var window = ifrm.contentWindow; 1243 //var prevheight = jQuery(ifrm).attr('height'); 1244 //var newheight = Math.max( window.document.body.scrollHeight, window.document.body.offsetHeight, window.document.documentElement.clientHeight, window.document.documentElement.scrollHeight, window.document.documentElement.offsetHeight ); 1245 //if (newheight != prevheight && newheight > 0) { 1246 // jQuery(ifrm).attr('height', newheight); 1247 // console.log("Adjusting iframe height for : " +prevheight+"px => "+newheight+"px"); 1248 //} 1249} 1250function getDocHeight(doc) { 1251 doc = doc || document; 1252 // stackoverflow.com/questions/1145850/ 1253 var body = doc.body, html = doc.documentElement; 1254 var height = Math.max(body.scrollHeight, body.offsetHeight, 1255 html.clientHeight, html.scrollHeight, html.offsetHeight); 1256 return height; 1257} 1258function closecustommodal() { 1259 if ($('#postbackName').length > 0) { 1260 $('#postbackName').val(''); 1261 } 1262 if ($('.custom-modal.preventclose').length > 0) { 1263 $('.custom-modal:not(.preventclose)').hide(); 1264 $('.custom-modal.preventclose').removeClass('preventclose'); 1265 } else { 1266 $('.custom-modal').hide(); 1267 $('#fadebackground').hide(); 1268 $('.custom-modal').css('z-index', ''); 1269 isLoader = true; 1270 $('iframe').css({ 'background': 'none', 'opacity': '1' }); 1271 } 1272 1273 1274 1275} 1276function ValidateUrl(url) { 1277 if (url.indexOf('.htm') > -1) { 1278 return true; 1279 } 1280 var re = /\`|\~|\!|\@@|\#|\$|\%|\^|\&|\*|\(|\)|\+|\=|\[|\{|\]|\}|\||\\|\'|\<|\,|\.|\>|\?|\/|\"|\;|\:/g; 1281 return !re.test(url); 1282} 1283window.onclick = function (event) { 1284 1285 if ($(event.target).is('.custom-modal:not(.password):not(#AuthVerifyNumber):not(#AuthVerifyEmail):not(#AuthConfrimCode):not(#AuthEmailConfrimCode):not(#AuthConfrimCodeEmail):not(#AuthVerification):not(#AuthEmailVerification):not(#AuthConfirmSuccess):not(.creditPop):not
1285(.modalDialog):not(#AuthEmailConfirmSuccess):not(#AuthGetAuthValues):not(#AuthMaxRetries):not(#AuthResetPassword):not(#AuthLockAccount):not(#BO_divAuthConfrimCode):not(#groupSelectionModal):not(#RestrictedAccount)')) { 1286 closecustommodal(); 1287 if ($(event.target).is('#DisplayApiKeyPopup') || $(event.target).is('#ShowAPIKeys')) { 1288 $('.modal-backdrop').remove(); 1289 } 1290 } 1291} 1292 1293//$(function () { 1294// $(window).on('resize', function () { 1295// $('#quickfit-a').quickfit({ max: 40, min: 20, truncate: false }); 1296// $('#quickfit-b').quickfit({ max: 40, min: 20, truncate: true }); 1297 1298// }); 1299// $(window).trigger('resize'); 1300//}); 1301 1302var pageWidth, pageHeight; 1303 1304var basePage = { 1305 width: 1898, 1306 height: 850, 1307 scale: 1, 1308 scaleX: 1, 1309 scaleY: 1, 1310 Bi: '' 1311}; 1312debounce = function (func, wait, immediate) { 1313 var timeout, result; 1314 return function () { 1315 var context = this, args = arguments; 1316 var later = function () { 1317 timeout = null; 1318 if (!immediate) result = func.apply(context, args); 1319 }; 1320 var callNow = immediate && !timeout; 1321 clearTimeout(timeout); 1322 timeout = setTimeout(later, wait); 1323 if (callNow) result = func.apply(context, args); 1324 return result; 1325 }; 1326};
1327var count = 0; 1328$(function () { 1329 if ($('#ctl00_HyperLink7').length > 0) { 1330 $('#ctl00_HyperLink7').parents('li').first().remove(); 1331 } 1332 1333 if ($('.api-address').length > 0) { 1334 $('.api-address').each(function () { 1335 var url = $(this).text(); 1336 if (url.indexOf('https://') < 0) { 1337 $(this).text('https://' + url); 1338 } 1339 }); 1340 } 1341 if ($("#ctl00_PageContent_directWrap").length > 0) 1342 $("#ctl00_PageContent_directWrap").find(".key").first().text($("#wrap").find(".key").first().text()); 1343 1344 //$('#ctl00_PageContent_lblDirectApiUrl').text('https://api.pulseem.com/api/v1/').parent().attr('href', 'https://api.pulseem.com/swagger/index.html'); 1345 1346 if (isInIFrame || (window.location.href.indexOf('CampaignEdit') > -1 && window.location.href.indexOf('CampaignEdit.aspx') == -1) || window.location.href.indexOf('NewFormEdit') > -1) { 1347 return; 1348 } 1349 1350 var $page = $('body'); 1351 getPageSize(); 1352 if (pageWidth < 1815) { 1353 scalePages($page, pageWidth, pageHeight); 1354 } 1355 //using underscore to delay resize method till finished resizing window 1356 $(window).resize(function () { 1357 $('body').removeClass('scaled'); 1358 basePage.scale = 1; 1359 getPageSize(); 1360 if (pageWidth < 1815) { 1361 scalePages($page, pageWidth, pageHeight); 1362 if ($('#fadebackground').length > 0) { 1363 $('#fadebackground').css('height', '5000px'); 1364 } 1365 1366 } else { 1367 $('body').removeClass('fixScale'); 1368 } 1369 1370 //if (pageWidth < 800 && $('.cardtable').length > 0 && $('.stacktable').length== 0) { 1371 // $('.cardtable').attr('display-header', 'false').stacktable(); 1372 //} 1373 // console.log(pageWidth); 1374 if (pageWidth < 1744) { 1375 $('#lp-container').parent().insertBefore($('#ctl00_PageContent_gridLastSmsCampaigns').parents('.col-md-4').first()); 1376 } else { 1377 $('#lp-container').parent().insertAfter($('#totalCon')); 1378 } 1379 //setTimeout(function () { 1380 // $('body').height($('body').height() * basePage.scale);; 1381 //}, 1000); 1382 1383 setGridCss(); 1384 1385 }); 1386 1387 function getPageSize() { 1388 if (typeof $('body').css('background-image') !== typeof undefined) { 1389 basePage.Bi = $('body').css('background-image'); 1390 } else { 1391 basePage.Bi = ''; 1392 } 1393 $('body').removeAttr('style'); 1394 if (basePage.Bi != '') 1395 $('body').css('background-image', basePage.Bi); 1396 pageHeight = $('body').height(); 1397 pageWidth = $('body').width(); 1398 } 1399 1400 function scalePages(page, maxWidth, maxHeight) { 1401 1402 var scaleX = 1, scaleY = 1; 1403 scaleX = maxWidth / basePage.width; 1404 basePage.scale = scaleX; 1405 if (isFF()) { 1406 $('body').addClass('scaled'); 1407 1408 setTimeout(function () { 1409 $('#top-menu ul').each(function () { 1410 $('li:odd', this).addClass('odd').removeClass('even'); 1411 $('li:even', this).addClass('even').removeClass('odd'); 1412 }); 1413 }, 500); 1414 1415 } 1416 1417 if (window.location.href.toLowerCase().indexOf('login') > -1) { 1418 return; 1419 } 1420 if (pageWidth < 1744 && $('body').hasClass('homepage')) { 1421 if (pageWidth < 1600) { 1422 $('body').addClass('fixScale'); 1423 } else { 1424 $('body').removeClass('fixScale'); 1425 } 1426 $('body').css('transform', 'none').css('width', '100%'); 1427 return; 1428 } else { 1429 $('body').removeClass('fixScale'); 1430 } 1431 //page.attr('style', '-webkit-transform:scale(' + basePage.scale.toFixed(3) + ');width:' + ((1 / basePage.scale) * 100).toFixed(3) + '%;'); 1432 //if (basePage.Bi != '') { 1433 // page.css('background-image', basePage.Bi); 1434 //} 1435 //if (window.location.href.indexOf('Login.aspx') > -1) { 1436 // page.css('height', ((1 / basePage.scale) * 100).toFixed(2) + '%'); 1437 //} 1438 1439 1440 1441 } 1442 1443 1444}); 1445jQuery.fn.putCursorAtEnd = function () { 1446 1447 return this.each(function () { 1448 1449 // Cache references 1450 var $el = $(this), 1451 el = this; 1452 1453 // Only focus if input isn't already 1454 if (!$el.is(":focus")) { 1455 $el.focus(); 1456 } 1457 1458 // If this function exists... (IE 9+) 1459 if (el.setSelectionRange) { 1460 1461 // Double the length because Opera is inconsistent about whether a carriage return is one character or tw
1461o. 1462 var len = $el.val().length * 2; 1463 1464 // Timeout seems to be required for Blink 1465 setTimeout(function () { 1466 el.setSelectionRange(len, len); 1467 }, 1); 1468 1469 } else { 1470 1471 // As a fallback, replace the contents with itself 1472 // Doesn't work in Chrome, but Chrome supports setSelectionRange 1473 $el.val($el.val()); 1474 1475 } 1476 1477 // Scroll to the bottom, in case we're in a tall textarea 1478 // (Necessary for Firefox and Chrome) 1479 this.scrollTop = 999999; 1480 1481 }); 1482 1483}; 1484 1485function services() { 1486 this.get_api = function (onsuccess, onerror) { 1487 new ajax_modal(basePulseemFolder + 'PulseemServices.asmx/API_SelectMany', 'POST', null, onsuccess, onerror).invoke(true); 1488 } 1489 this.isAuthorizeForNumber = function (cellphone, onsuccess, onerror) { 1490 var data = "{'Cellphone':'" + cellphone + "'}"; //id 1 for cookies 1491 new ajax_modal(basePulseemFolder + 'pulseeminner1149.asmx/IsAuthorizeForNumber', 'POST', data, onsuccess, onerror).invoke(false); 1492 } 1493 this.insertSingleCellphone = function (cellphone, onsuccess, onerror) { 1494 $('#spCellminErr').hide() 1495 if ($.trim(cellphone).length < 10) { 1496 $('#spCellminErr').show(); return false; 1497 }
1498 SetLoaderForElement($('#AuthVerifyNumber .authRoundButton')); 1499 var data = "{'Cellphone':'" + cellphone + "'}"; //id 1 for cookies 1500 new ajax_modal(basePulseemFolder + 'pulseeminner1149.asmx/InsertSingleCellphone', 'POST', data, onsuccess, onerror).invoke(true); 1501 } 1502 1503 this.insertSingleEmail = function (email, onsuccess, onerror) { 1504 $('#spEmailErr').hide() 1505 var rgx = /^([\.-]?\w+)+@\w+([\.:-]?\w+)+(\.[a-zA-Z0-9]{2,})+$/; 1506 if (rgx.test(email) == false) { 1507 $('#spEmailErr').show(); 1508 return false; 1509 } 1510 SetLoaderForElement($('#AuthVerifyEmail > .authRoundButton')); 1511 var data = "{'Email':'" + email + "'}"; //id 1 for cookies 1512 new ajax_modal(basePulseemFolder + 'pulseeminner1149.asmx/InsertSingleEmail', 'POST', data, onsuccess, onerror).invoke(true); 1513 } 1514 this.confirmCode = function (authTypeValue, code, isCellphone, onsuccess, onerror) { 1515 let data = {}; 1516 if (isCellphone) { 1517 SetLoaderForElement($('#AuthConfrimCode > div.custom-modal-content')); 1518 new ajax_modal(basePulseemFolder + 'pulseeminner1149.asmx/ConfirmCellphone', 'POST', "{'Cellphone':'" + authTypeValue + "','Code':'" + code + "'}", onsuccess, onerror).invoke(true); 1519 } 1520 else { 1521 SetLoaderForElement($('#AuthEmailConfrimCode > div.custom-modal-content')); 1522 new ajax_modal(basePulseemFolder + 'pulseeminner1149.asmx/ConfirmEmail', 'POST', "{'Email':'" + authTypeValue + "','Code':'" + code + "'}", onsuccess, onerror).invoke(true); 1523 } 1524 1525 //var data = "{'Cellphone':'" + cellphone + "','Code':'" + code + "'}"; 1526 } 1527 1528 this.getRelatedSubAccountNumber = function (onsuccess, onerror) { 1529 var data = "{'subID':-1}"; //TODO - Fix it generic when have time 1530 new ajax_modal(basePulseemFolder + 'pulseeminner1149.asmx/GetRelatedSubAccountNumber', 'POST', data, onsuccess, onerror).invoke(false); 1531 } 1532 this.GetRelatedSubAccountEmails = function (onSuccess, onError) { 1533 var data = "{'subID':-1}"; //TODO - Fix it generic when have time 1534 new ajax_modal(basePulseemFolder + 'pulseeminner1149.asmx/GetRelatedSubAccountEmails', 'POST', data, onSuccess, onError).invoke(false); 1535 } 1536 1537 this.NoAuthEmailFirstTime = function (onsuccess, onerror) { 1538 var data = "{'Action':'No'}"; 1539 new ajax_modal(basePulseemFolder + 'pulseeminner1149.asmx/NoAuthEmailFirstTime', 'POST', data, onsuccess, onerror).invoke(false); 1540 } 1541 this.AuthEmail = function (onsuccess, onerror) { 1542 var data = "{'Action':'Email'}"; 1543 new ajax_modal(basePulseemFolder + 'pulseeminner1149.asmx/AuthEmail', 'POST', data, onsuccess, onerror).invoke(false); 1544 } 1545 1546 this.ConfirmEmail = function (code, onsuccess, onerror) { 1547 var data = "{'Code':" + code + "}"; 1548 new ajax_modal(basePulseemFolder + 'pulseeminner1149.asmx/ConfirmEmailCode', 'POST', data, onsuccess, onerror).invoke(true); 1549 } 1550} 1551function ajax_modal(url, type, data, onsuccess, onerror) { 1552 1553 this.invoke = function (isAsync) { 1554 $.ajax({
1555 type: type, 1556 url: url, 1557 async: isAsync, 1558 data: data, 1559 contentType: "application/json; charset=utf-8", 1560 dataType: "json", 1561 success: onsuccess, 1562 error: onerror 1563 }); 1564 } 1565} 1566 1567function SetLoaderForElement(el) { 1568 if($('#loaderForElement').length>0) 1569 return; 1570 var y = el.height(); 1571 var x = el.width(); 1572 var finalY = ((y - 100) / 2); 1573 var finalX = ((x - 100) / 2); 1574 1575 var loader = '<img id="loaderForElement" alt="" src="Images/PulseemGrid/ajax-loader.gif" style="width:100px; height:100px; margin-top:' + finalY + 'px; margin-left:' + finalX + 'px; margin-right:' + finalX + 'px; position:absolute; z-index:5000" />'; 1576 $(loader).prependTo(el); 1577 1578 $('#fadebackground').css('z-index','10000').show(); 1579} 1580 1581 1582function HideLoader(){ 1583 $('#loaderForElement').remove(); 1584 $('#fadebackground').hide(); 1585} 1586 1587//Auth 1588function showAuthVerification() { 1589 new services().getRelatedSubAccountNumber(onGetRelatedSubAccountNumberSuccess, onGetRelatedSubAccountNumberError); 1590 $('#AuthVerification').show(); 1591 $('body').prepend('<div class="modal-backdrop in" style="z-index:9999"></div>'); 1592 return false; 1593} 1594 1595function onGetRelatedSubAccountNumberSuccess(response) { 1596 var resLen = response.d.length; 1597 var htmlOptin = ''; 1598 var htmlNotOptin = ''; 1599 var txtButton = $('#AuthVerfiedNumbers').data('reverifytxt'); 1600 for (var i = 0; i < resLen; i++) { 1601 if (response.d[i].IsOptIn) { 1602 htmlOptin += '<div><i class="fa fa-check-circle" style="color: green; font-size: 16px;margin:0px 5px;"></i>' + response.d[i].Number + '</div>'; 1603 } else { 1604 htmlNotOptin += '<div><i class="fa fa-remove" style="color: green; font-size: 16px; color: darkred;margin: 0px 5px;"></i>' + response.d[i].Number + '<div style=" display: inline-block; margin: 0px 10px;"><a href="#" onclick="$(\'#AuthVerification\').hide();NotAuthorizeForNumber(\'' + response.d[i].Number + '\',true);">' + txtButton+ '</a></div></div>'; 1605 } 1606 1607 } 1608 $('#AuthVerfiedNumbers').html(htmlOptin + htmlNotOptin); 1609 // console.log(response.d); 1610} 1611function onGetRelatedSubAccountNumberError(response) { 1612 console.log(response); 1613 1614} 1615 1616function NotAuthorizeForNumber(cellphone, isDisabled) { 1617 $('#AuthVerifyNumber').show(); 1618 $('#txtAuthCellphone').val(cellphone); 1619 if (isDisabled) $('#txtAuthCellphone').attr('disabled', 'disabled'); 1620 else $('#txtAuthCellphone').removeAttr('disabled'); 1621 if ($('.modal-backdrop.in').length == 0) 1622 $('body').prepend('<div class="modal-backdrop in" style="z-index:9999"></div>'); 1623 1624} 1625function NotAuthorizeForEmail(email, isDisabled) { 1626 $("#custom-file-popup").hide(); 1627 $('#AuthEmailVerification').hide(); 1628 $('#AuthVerifyEmail').show(); 1629 $('#txtAuthEmail').val(email); 1630 if (isDisabled) $('#txtAuthEmail').attr('disabled', 'disabled'); 1631 else $('#txtAuthEmail').removeAttr('disabled'); 1632 if ($('.modal-backdrop.in').length == 0) 1633 $('body').prepend('<div class="modal-backdrop in" style="z-index:9999"></div>'); 1634} 1635 1636 1637function onSuccessAuth(response) { 1638 if (response.d) { 1639 $('#authConfirmErrors > span').hide(); 1640 $('#AuthConfrimCode').show(); 1641 $('#AuthConfrimCode #authresend').attr('onclick', '$(\'#AuthConfrimCode\').hide();$(\'#AuthVerifyNumber\').show();'); 1642 $('#AuthVerifyNumber').hide(); 1643 $('#AuthVerifyEmail').hide(); 1644 const text = $("#authNumberText").html().replace('{0}', '<span style="color:blue;">' + $('#txtAuthCellphone').val() + '</span>'); 1645 $('#authConfirmTxt').html(text); 1646 } 1647 HideLoader(); 1648} 1649function onSuccessEmailAuth(response) { 1650 if (response.d) { 1651 $('#authEmailConfirmErrors > span').hide(); 1652 $('#AuthEmailConfrimCode').show(); 1653 $('#AuthEmailConfrimCode #authresend').attr('onclick', '$(\'#AuthEmailConfrimCode\').hide();$(\'#AuthVerifyEmail\').show();'); 1654 $('#AuthVerifyEmail').hide(); 1655 const text = $("#authEmailText").html().replace('{0}', '<span style="color:blue;">' + $('#txtAuthEmail').val() + '</span>'); 1656 $('#authConfirmEmailTxt').html(text); 1657 } 1658 HideLoader(); 1659 1660} 1661function onErrorAuth(res) { 1662 console.log(res); 1663 HideLoader(); 1664} 1665function onSuccessConfrimAuth(response) { 1666 $('#authConfirmErrors').css('visibility', 'hidden'); 1667 $('#authConfirmErrors > span').hide(); 1668 var errID = ""; 1669 switch (response.d) { 1670 case 'Expired': 1671 errID = '#spAuthExpired'; 1672 break; 1673 case 'NotMatch': 1674 errID = '#spAuthWrongCode'; 1675 break; 1676 case 'TooMuch': 1677 errID = '#spAuthToManyTimes'; 1678 break; 1679 case 'Abused': 1680 errID = '#spAuthAbused'; 1681 break; 1682 case 'OK': 1683 break; 1684 case 'Error': 1685 default: 1686 errID = '#spAuthError'; 1687 break; 1688 } 1689 if (errID != "") { 1690 $('#authConfirmErrors').css('visibility', ''); 1691 $(errID).show(); 1692 } else { 1693 $('#AuthConfrimCode').hide(); 1694 $('#AuthConfirmSuccess').show(); 1695 } 1696 HideLoader(); 1697} 1698function onSuccessEmailConfrimAuth(response) { 1699 $('#authEmailConfirmErrors').css('visibility', 'hidden'); 1700 $('#authEmailConfirmErrors > span').hide(); 1701 var errID = ""; 1702 switch (response.d) { 1703 case 'Expired': 1704 errID = '#spEmailAuthExpired'; 1705 break; 1706 case 'NotMatch': 1707 errID = '#spEmailAuthWrongCode'; 1708 break; 1709 case 'TooMuch': 1710 errID = '#spEmailAuthToManyTimes'; 1711 break; 1712 case 'Abused': 1713 errID = '#spEmailAuthAbused'; 1714 break; 1715 case 'OK': 1716 break; 1717 case 'Error': 1718 default: 1719 errID = '#spEmailAuthError'; 1720 break; 1721 } 1722 if (errID != "") { 1723 $('#authEmailConfirmErrors').css('visibility', ''); 1724 $(errID).show(); 1725 } else { 1726 $('#AuthEmailConfrimCode').hide(); 1727 $('#AuthEmailConfirmSuccess').show(); 1728 } 1729 HideLoader(); 1730}
1731function onErrorConfirmAuth(res) { 1732 console.log(res); 1733 HideLoader(); 1734} 1735 1736function showEmailAuthVerification() { 1737 new services().GetRelatedSubAccountEmails(onGetRelatedSubAccountEmailSuccess, onGetRelatedSubAccountNumberError); 1738 $('#AuthEmailVerification').show(); 1739 $('body').prepend('<div class="modal-backdrop in" style="z-index:9999"></div>'); 1740 return false; 1741} 1742 1743function onGetRelatedSubAccountEmailSuccess(response) { 1744 var resLen = response.d.length; 1745 var htmlOptin = ''; 1746 var htmlNotOptin = ''; 1747 var txtButton = $('#AuthVerfiedEmail').data('reverifytxt'); 1748 for (var i = 0; i < resLen; i++) { 1749 if (response.d[i].IsOptIn) { 1750 htmlOptin += '<div><i class="fa fa-check-circle" style="color: green; font-size: 16px;margin:0px 5px;"></i>' + response.d[i].Number + '</div>'; 1751 } else { 1752 htmlNotOptin += '<div><i class="fa fa-remove" style="color: green; font-size: 16px; color: darkred;margin: 0px 5px;"></i>' + response.d[i].Number + '<div style=" display: inline-block; margin: 0px 10px;"><a href="#" onclick="NotAuthorizeForEmail(\'' + response.d[i].Number + '\',true);">' + txtButton + '</a></div></div>'; 1753 } 1754 1755 } 1756 $('#AuthVerfiedEmail').html(htmlOptin + htmlNotOptin); 1757 // console.log(response.d); 1758} 1759 1760function alertMSGDynamic(title, msg, closeText, culture, onOkClick) { 1761 culture = (culture + "").toLowerCase(); 1762 var dir = "rtl" 1763 1764 1765 console.log("culture is " + culture) 1766 1767 if (["he-il", "il", "he"].includes(culture) == false) { 1768 dir = "ltr" 1769 } 1770 else if ($("body").hasClass("bodyltr") == true) { 1771 dir = "ltr" 1772 } 1773 let div = '<div id="content-alert" style="padding: 8px 93px 32px 0px;"> <div class="bluetext font-size30" id="titlealert">' 1774 if (dir == "ltr") { 1775 div = '<div id="content-alert" style="padding: 8px 0px 32px 93px;"> <div class="bluetext font-size30" id="titlealert">' 1776 } 1777 if (onOkClick == null) { 1778 onOkClick = '(function(){ })' 1779 } 1780 1781 1782 let sHtml = '<div class = "custom-modal alert" id = "alertMSGDynamic" style = "direction: ' 1783 + dir + '; display: block;"><div class="custom-modal-content" style="width: 570px;padding:0;"><div style="padding: 20px;"><div class="closemodal" onclick="$(this).closest(\'#alertMSGDynamic\').remove();"><i class="fa fa-times" aria-hidden="true"></i></div><div style="border: 2px solid #0371ad; border-radius: 5px; padding: 20px 33px 11px 11px;"><img src="/Pulseem/Content/Images/warning.png" class="margin-left24" style="width: 69px; margin-top: 7px; position: absolute;">' 1784 + div 1785 + title 1786 + '</div><div id="bodyalert" class="graycolor" style="font-size: 20px;">' 1787 + msg 1788 + '</div></div><div class="closetext"><a href="#" class="bluetext" ' 1789 + 'onclick="' + onOkClick + '();$(this).closest(\'#alertMSGDynamic\').remove();">' 1790 + closeText 1791 + '</a></div></div></div></div></div>'; 1792 1793 1794 1795 1796 $('body').append(sHtml); 1797 1798 $('#alertMSGDynamic').fadeIn(100); 1799 setTimeout(function () { 1800 $('#alertMSGDynamic').show(); 1801 }, 100); 1802 1803 1804 $('#fadebackground').fadeIn(100); 1805} 1806var english = /^[A-Za-z0-9]*$/; 1807var isMobile = false; //initiate as false 1808// device detection 1809if (/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|ipad|iris|kindle|Android|Silk|lge |maemo|midp|mmp|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i.test(navigator.userAgent) 1810 || /1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|
1810sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(navigator.userAgent.substr(0, 4))) isMobile = true; 1811 1812
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.