PageSourceSearch

https://ufa.com/_ui/responsive/common/js/acc.contenthelper.js

js ufa.com collected 2026-10-02 10:49:59 UTC 2,647 bytes, 76 lines download raw bytes

1/* Done Branded Content */
2jQuery(document).ready(function () {
3    var isMobile = /Android|webOS|iPhone|iPad|iPod|BlackBerry/i.test(navigator.userAgent) ? true : false;
4  
5    jQuery(".brand-done").each(function () {
6      var selected = jQuery(this),
7        textureXPosition = Math.floor(Math.random() * 101),
8        textureYPosition = Math.floor(Math.random() * 101),
9        textureNumber = Math.floor(Math.random() * 3) + 1,
10        colorCheck = "white",
11        ignore = false;
12  
13  
14      selected.css({
15        "background": "black",
16        "background-image": "url(https://ufadigmtg.blob.core.windows.net/default/ufa.com/images/general/done/1-white.png)"
17      });
18  
19      if (selected.hasClass("ignore")) {
20        selected.css("opacity", "1");
21        return true;
22      }
23      
24      processTexture(selected, textureXPosition, textureYPosition, textureNumber, colorCheck);
25  
26      colorCheck = "black";
27      selected.append('<span class="text"></span>')
28      selected.find('.text').each(function () {
29        var selectedAfter = jQuery(this)
30        processTexture(selectedAfter, textureXPosition, textureYPosition, textureNumber, colorCheck);
31      });
32    });
33  
34    function processTexture(currentElement, textureXPosition, textureYPosition, textureNumber, colorCheck) {
35      currentElement.css({
36        "background-position": textureXPosition + "% " + textureYPosition + "%"
37      });
38  
39      if (isMobile || jQuery(window).width() < 767) {
40        currentElement.css({
41          "background-image": "url(https://ufadigmtg.blob.core.windows.net/default/ufa.com/images/general/done/1-" + colorCheck + ".png)"
42        });
43      } else {
44        currentElement.css({
45          "background-image": "url(https://ufadigmtg.blob.core.windows.net/default/ufa.com/images/general/done/" + textureNumber + "-" + colorCheck + ".png)"
46        });
47      }
48  
49      currentElement.css("opacity", "1");
50    }
51  
52    function checkBreakpoint() {
53      jQuery('.done-container[data-breakpoint]').each(function () {
54        /* Container goes inactive at the breakpoint window width */
55        var currentElement = jQuery(this),
56          breakpoint = parseInt(currentElement.attr('data-breakpoint'))
57        if (breakpoint > window.innerWidth) {
58          currentElement.addClass('inactive')
59        } else {
60          currentElement.removeClass('inactive')
61        }
62      })
63    };
64  
65    checkBreakpoint();
66  
67    var resizeTimer;
68  
69    $(window).resize(function () {
70      clearTimeout(resizeTimer);
71      resizeTimer = setTimeout(function () {
72        checkBreakpoint();
73      }, 250);
74    })
75  });
76  /* END - Done Branded Content */

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.