PageSourceSearch

https://aroundlucia.com/wp-content/plugins/wp-twitterbadge/js/badge.js

js aroundlucia.com collected 2026-09-26 05:52:42 UTC 2,857 bytes, 57 lines download raw bytes

1var tfbSkipInit = typeof tfb === 'undefined';
2var tfb = tfb || {};
3tfb.allowedLabels = ["follow-me", "follow-us", "follow", "my-twitter"];
4tfb.defaultTop = 78;
5tfb.defaultColor = "#35ccff";
6tfb.isInArray = function(str, ar) {
7    if (ar.length < 1) return;
8    for (var i = 0; i < ar.length; i++) {
9        if (ar[i] == str) {
10            return true;
11            break;
12        }
13    }
14    return false;
15}
16tfb.showbadge = function() {
17    if (!window.XMLHttpRequest) {
18        return;
19    }
20    if (document.getElementById('twitterFollowBadge')) {
21        document.body.removeChild(document.getElementById('twitterFollowBadge'));
22    }
23    if (tfb.top < 0 || tfb.top > 1000 || isNaN(tfb.top)) {
24        tfb.top = tfb.defaultTop;
25    }
26    if (!tfb.isInArray(tfb.label, tfb.allowedLabels)) {
27        tfb.label = tfb.allowedLabels[0];
28    }
29    var validColorPattern = /^#([a-f]|[A-F]|[0-9]){3}(([a-f]|[A-F]|[0-9]){3})?$/;
30    if (tfb.color != 'transparent' && (!validColorPattern.test(tfb.color) || (tfb.color.length != 4 && tfb.color.length != 7))) {
31        tfb.color = tfb.defaultColor;
32    };
33    if (tfb.side != 'l') {
34        tfb.side = 'r';
35    }
36    tfb.tabStyleCode = 'position:fixed;' + 'top:' + tfb.top + 'px;' + 'width:30px;' + 'height:119px;' + 'z-index:8765;' + 'cursor:pointer;' + 'background:' + tfb.color + ' url(' + tfb.path + tfb.label + '.png);' + 'background-repeat:no-repeat;';
37    tfb.aboutStyleCode = 'position:fixed;' + 'top:' + (parseInt(tfb.top) + 107) + 'px;' + 'width:10px;' + 'height:11px;' + 'z-index:9876;' + 'cursor:pointer;' + 'background:url(' + tfb.path + 'icon-about.png);' + 'background-repeat:no-repeat;';
38    if (tfb.side == 'l') {
39        tfb.tabStyleCode += 'left:0; background-position:right top;';
40        tfb.aboutStyleCode += 'left:0;';
41    } else {
42        tfb.tabStyleCode += 'right:0; background-position:left top;';
43        tfb.aboutStyleCode += 'right:0;';
44    }
45    tfbMainDiv = document.createElement('div');
46    tfbMainDiv.setAttribute('id', 'twitterFollowBadge');
47    document.body.appendChild(tfbMainDiv);
48    tfbMainDiv.innerHTML = '<div id="tfbTab" style="' + tfb.tabStyleCode + '"></div><div id="tfbAbout" style="' + tfb.aboutStyleCode + '"></div>' + '<style>#tfbAbout{visibility:hidden;} #twitterFollowBadge:hover #tfbAbout{visibility:visible;}</style>';
49    document.getElementById('tfbTab').onclick = function() {
50        window.open('https://twitter.com/' + tfb.account);
51    }
52    document.getElementById('tfbAbout').onclick = function() {
53        window.open('https://www.kyleabaker.com/goodies/coding/wp-twitterbadge/');
54    }
55}
56if (typeof document!=='undefined' && typeof document.body!=='undefined' && typeof document.body.style!=='undefined' && typeof document.body.style.msOverflowStyle!=='undefined') document.body.style.msOverflowStyle = 'scrollbar';
57if (!tfbSkipInit) tfb.showbadge();

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.