/examples/twitter/widgets.js
JavaScript | 1637 lines | 1637 code | 0 blank | 0 comment | 409 complexity | 771e6f26c627bacf2ce2217e7c41091b MD5 | raw file
Possible License(s): BSD-3-Clause
Large files files are truncated, but you can click here to view the full file
- if (!window.__twttrlr) {
- (function(a, b) {
- function s(a) {
- for (var b = 1, c; c = arguments[b]; b++) for (var d in c) a[d] = c[d];
- return a
- }
- function t(a) {
- return Array.prototype.slice.call(a)
- }
- function v(a, b) {
- for (var c = 0, d; d = a[c]; c++) if (b == d) return c;
- return -1
- }
- function w() {
- var a = t(arguments),
- b = [];
- for (var c = 0, d = a.length; c < d; c++) a[c].length > 0 && b.push(a[c].replace(/\/$/, ""));
- return b.join("/")
- }
- function x(a, b, c) {
- var d = b.split("/"),
- e = a;
- while (d.length > 1) {
- var f = d.shift();
- e = e[f] = e[f] || {}
- }
- e[d[0]] = c
- }
- function y() {}
- function z(a, b) {
- this.id = this.path = a, this.force = !! b
- }
- function A(a, b) {
- this.id = a, this.body = b, typeof b == "undefined" && (this.path = this.resolvePath(a))
- }
- function B(a, b) {
- this.deps = a, this.collectResults = b, this.deps.length == 0 && this.complete()
- }
- function C(a, b) {
- this.deps = a, this.collectResults = b
- }
- function D() {
- for (var a in d) if (d[a].readyState == "interactive") return l[d[a].id]
- }
- function E(a, b) {
- var d;
- return !a && c && (d = k || D()), d ? (delete l[d.scriptId], d.body = b, d.execute()) : (j = d = new A(a, b), i[d.id] = d), d
- }
- function F() {
- var a = t(arguments),
- b, c;
- return typeof a[0] == "string" && (b = a.shift()), c = a.shift(), E(b, c)
- }
- function G(a, b) {
- var c = b.id || "",
- d = c.split("/");
- d.pop();
- var e = d.join("/");
- return a.replace(/^\./, e)
- }
- function H(a, b) {
- function d(a) {
- return A.exports[G(a, b)]
- }
- var c = [];
- for (var e = 0, f = a.length; e < f; e++) {
- if (a[e] == "require") {
- c.push(d);
- continue
- }
- if (a[e] == "exports") {
- b.exports = b.exports || {}, c.push(b.exports);
- continue
- }
- c.push(d(a[e]))
- }
- return c
- }
- function I() {
- var a = t(arguments),
- b = [],
- c, d;
- return typeof a[0] == "string" && (c = a.shift()), u(a[0]) && (b = a.shift()), d = a.shift(), E(c, function(a) {
- function f() {
- var e = H(t(b), c),
- f;
- typeof d == "function" ? f = d.apply(c, e) : f = d, typeof f == "undefined" && (f = c.exports), a(f)
- }
- var c = this,
- e = [];
- for (var g = 0, h = b.length; g < h; g++) {
- var i = b[g];
- v(["require", "exports"], i) == -1 && e.push(G(i, c))
- }
- e.length > 0 ? J.apply(this, e.concat(f)) : f()
- })
- }
- function J() {
- var a = t(arguments),
- b, c;
- typeof a[a.length - 1] == "function" && (b = a.pop()), typeof a[a.length - 1] == "boolean" && (c = a.pop());
- var d = new B(K(a, c), c);
- return b && d.then(b), d
- }
- function K(a, b) {
- var c = [];
- for (var d = 0, e; e = a[d]; d++) typeof e == "string" && (e = L(e)), u(e) && (e = new C(K(e, b), b)), c.push(e);
- return c
- }
- function L(a) {
- var b, c;
- for (var d = 0, e; e = J.matchers[d]; d++) {
- var f = e[0],
- g = e[1];
- if (b = a.match(f)) return g(a)
- }
- throw new Error(a + " was not recognised by loader")
- }
- function N() {
- return a.using = m, a.provide = n, a.define = o, a.loadrunner = p, M
- }
- function O(a) {
- for (var b = 0; b < J.bundles.length; b++) for (var c in J.bundles[b]) if (c != a && v(J.bundles[b][c], a) > -1) return c
- }
- var c = a.attachEvent && !a.opera,
- d = b.getElementsByTagName("script"),
- e = 0,
- f, g = b.createElement("script"),
- h = {},
- i = {},
- j, k, l = {},
- m = a.using,
- n = a.provide,
- o = a.define,
- p = a.loadrunner;
- for (var q = 0, r; r = d[q]; q++) if (r.src.match(/loadrunner\.js(\?|#|$)/)) {
- f = r;
- break
- }
- var u = Array.isArray ||
- function(a) {
- return a.constructor == Array
- };
- y.prototype.then = function(b) {
- var c = this;
- return this.started || (this.started = !0, this.start()), this.completed ? b.apply(a, this.results) : (this.callbacks = this.callbacks || [], this.callbacks.push(b)), this
- }, y.prototype.start = function() {}, y.prototype.complete = function() {
- if (!this.completed) {
- this.results = t(arguments), this.completed = !0;
- if (this.callbacks) for (var b = 0, c; c = this.callbacks[b]; b++) c.apply(a, this.results)
- }
- }, z.loaded = [], z.prototype = new y, z.prototype.start = function() {
- var a = this,
- b, c, d;
- return (d = i[this.id]) ? (d.then(function() {
- a.complete()
- }), this) : ((b = h[this.id]) ? b.then(function() {
- a.loaded()
- }) : !this.force && v(z.loaded, this.id) > -1 ? this.loaded() : (c = O(this.id)) ? J(c, function() {
- a.loaded()
- }) : this.load(), this)
- }, z.prototype.load = function() {
- var b = this;
- h[this.id] = b;
- var c = g.cloneNode(!1);
- this.scriptId = c.id = "LR" + ++e, c.type = "text/javascript", c.async = !0, c.onerror = function() {
- throw new Error(b.path + " not loaded")
- }, c.onreadystatechange = c.onload = function(c) {
- c = a.event || c;
- if (c.type == "load" || v(["loaded", "complete"], this.readyState) > -1) this.onreadystatechange = null, b.loaded()
- }, c.src = this.path, k = this, d[0].parentNode.insertBefore(c, d[0]), k = null, l[c.id] = this
- }, z.prototype.loaded = function() {
- this.complete()
- }, z.prototype.complete = function() {
- v(z.loaded, this.id) == -1 && z.loaded.push(this.id), delete h[this.id], y.prototype.complete.apply(this, arguments)
- }, A.exports = {}, A.prototype = new z, A.prototype.resolvePath = function(a) {
- return w(J.path, a + ".js")
- }, A.prototype.start = function() {
- var a, b, c = this,
- d;
- this.body ? this.execute() : (a = A.exports[this.id]) ? this.exp(a) : (b = i[this.id]) ? b.then(function(a) {
- c.exp(a)
- }) : (bundle = O(this.id)) ? J(bundle, function() {
- c.start()
- }) : (i[this.id] = this, this.load())
- }, A.prototype.loaded = function() {
- var a, b, d = this;
- c ? (b = A.exports[this.id]) ? this.exp(b) : (a = i[this.id]) && a.then(function(a) {
- d.exp(a)
- }) : (a = j, j = null, a.id = a.id || this.id, a.then(function(a) {
- d.exp(a)
- }))
- }, A.prototype.complete = function() {
- delete i[this.id], z.prototype.complete.apply(this, arguments)
- }, A.prototype.execute = function() {
- var a = this;
- typeof this.body == "object" ? this.exp(this.body) : typeof this.body == "function" && this.body.apply(window, [function(b) {
- a.exp(b)
- }])
- }, A.prototype.exp = function(a) {
- this.complete(this.exports = A.exports[this.id] = a || {})
- }, B.prototype = new y, B.prototype.start = function() {
- function b() {
- var b = [];
- a.collectResults && (b[0] = {});
- for (var c = 0, d; d = a.deps[c]; c++) {
- if (!d.completed) return;
- d.results.length > 0 && (a.collectResults ? d instanceof C ? s(b[0], d.results[0]) : x(b[0], d.id, d.results[0]) : b = b.concat(d.results))
- }
- a.complete.apply(a, b)
- }
- var a = this;
- for (var c = 0, d; d = this.deps[c]; c++) d.then(b);
- return this
- }, C.prototype = new y, C.prototype.start = function() {
- var a = this,
- b = 0,
- c = [];
- return a.collectResults && (c[0] = {}), function d() {
- var e = a.deps[b++];
- e ? e.then(function(b) {
- e.results.length > 0 && (a.collectResults ? e instanceof C ? s(c[0], e.results[0]) : x(c[0], e.id, e.results[0]) : c.push(e.results[0])), d()
- }) : a.complete.apply(a, c)
- }(), this
- }, I.amd = {};
- var M = function(a) {
- return a(J, F, M, define)
- };
- M.Script = z, M.Module = A, M.Collection = B, M.Sequence = C, M.Dependency = y, M.noConflict = N, a.loadrunner = M, a.using = J, a.provide = F, a.define = I, J.path = "", J.matchers = [], J.matchers.add = function(a, b) {
- this.unshift([a, b])
- }, J.matchers.add(/(^script!|\.js$)/, function(a) {
- var b = new z(a.replace(/^\$/, J.path.replace(/\/$/, "") + "/").replace(/^script!/, ""), !1);
- return b.id = a, b
- }), J.matchers.add(/^[a-zA-Z0-9_\-\/]+$/, function(a) {
- return new A(a)
- }), J.bundles = [], f && (J.path = f.getAttribute("data-path") || f.src.split(/loadrunner\.js/)[0] || "", (main = f.getAttribute("data-main")) && J.apply(a, main.split(/\s*,\s*/)).then(function() {}))
- })(this, document);
- (window.__twttrlr = loadrunner.noConflict());
- }
- __twttrlr(function(using, provide, loadrunner, define) {
- provide("util/iframe", function(a) {
- a(function(a) {
- var b = document.createElement("div"),
- c;
- b.innerHTML = "<iframe allowtransparency='true' frameborder='0' scrolling='no'></iframe>", c = b.firstChild, c.src = a.url, c.className = a.className || "";
- if (a.css) for (var d in a.css) c.style[d] = a.css[d];
- if (a.attributes) for (var e in a.attributes) c.setAttribute(e, a.attributes[e]);
- return a.replace ? a.replace.parentNode.replaceChild(c, a.replace) : document.body.insertBefore(c, document.body.firstChild), c
- })
- });
- provide("util/querystring", function(a) {
- function b(a) {
- return encodeURIComponent(a).replace(/\+/g, "%2B")
- }
- function c(a) {
- return decodeURIComponent(a)
- }
- function d(a) {
- var c = [];
- for (var d in a) a[d] !== null && typeof a[d] != "undefined" && c.push(b(d) + "=" + b(a[d]));
- return c.sort().join("&")
- }
- function e(a) {
- var b = {},
- d, e, f, g;
- if (a) {
- d = a.split("&");
- for (g = 0; f = d[g]; g++) e = f.split("="), e.length == 2 && (b[c(e[0])] = c(e[1]))
- }
- return b
- }
- function f(a, b) {
- var c = d(b);
- return c.length > 0 ? a.indexOf("?") >= 0 ? a + "&" + d(b) : a + "?" + d(b) : a
- }
- a({
- url: f,
- decode: e,
- encode: d,
- encodePart: b,
- decodePart: c
- })
- });
- provide("util/nodeselect", function(a) {
- var b = document,
- c = "querySelectorAll" in b ?
- function(a, c) {
- return b.querySelectorAll(a + "." + c)
- } : "getElementsByClassName" in b ?
- function(a, c) {
- var d = b.getElementsByClassName(c),
- e, f = [];
- for (i = 0; e = d[i]; i++) e.tagName.toLowerCase() == a && f.push(e);
- return f
- } : function(a, c) {
- var d = b.getElementsByTagName(a),
- e, f = new RegExp("(?:^|\\s+)" + c + "(?:\\s+|$)"),
- g = [];
- for (i = 0; e = d[i]; i++) f.test(e.className) && g.push(e);
- return g
- };
- a(c)
- });
- provide("$vendor/domready/ready.js", function(exports) {
- !
- function(a) {
- function k() {
- b = 1;
- for (var a = 0, d = c.length; a < d; a++) c[a]()
- }
- var b = 0,
- c = [],
- d, e, f = !1,
- g = a.createElement("a"),
- h = "DOMContentLoaded",
- i = "addEventListener",
- j = "onreadystatechange";
- /^loade|c/.test(a.readyState) && (b = 1), a[i] && a[i](h, e = function() {
- a.removeEventListener(h, e, f), k()
- }, f), g.doScroll && a.attachEvent(j, d = function() {
- /^c/.test(a.readyState) && (a.detachEvent(j, d), k())
- });
- var l = g.doScroll ?
- function(a) {
- self != top ? b ? a() : c.push(a) : !
- function() {
- try {
- g.doScroll("left")
- } catch (b) {
- return setTimeout(function() {
- l(a)
- }, 50)
- }
- a()
- }()
- } : function(a) {
- b ? a() : c.push(a)
- };
- typeof module != "undefined" && module.exports ? module.exports = {
- domReady: l
- } : window.domReady = l
- }(document);
- exports();
- loadrunner.Script.loaded.push("$vendor/domready/ready.js")
- });
- provide("util/domready", function(a) {
- using("$vendor/domready/ready.js", function() {
- a(domReady)
- })
- });
- provide("util/util", function(a) {
- function b(a) {
- for (var b = 1, c; c = arguments[b]; b++) for (var d in c) a[d] = c[d];
- return a
- }
- function c(a) {
- return b([], a)
- }
- function d(a) {
- for (var b in a) a.hasOwnProperty(b) && !a[b] && a[b] !== !1 && a[b] !== 0 && delete a[b]
- }
- function e(a, b) {
- if (a.indexOf) return a.indexOf(b);
- for (var c = 0, d; d = a[c]; c++) if (b == d) return c;
- return -1
- }
- function f(a, b) {
- if (!a) return null;
- if (!b) return a;
- if (a.filter) return a.filter(b);
- var c = [],
- d = 0,
- e = a.length;
- for (; d < e; d++) b(a[d]) && c.push(a[d]);
- return c
- }
- function g(a, b) {
- if (a.contains) return a.contains(b);
- var c = b.parentNode;
- while (c) {
- if (c === a) return !0;
- c = c.parentNode
- }
- return !1
- }
- a({
- aug: b,
- array: c,
- indexOf: e,
- filter: f,
- compact: d,
- containsElement: g
- })
- });
- provide("tfw/widget/base", function(a) {
- using("util/util", "util/domready", "util/nodeselect", "util/querystring", "util/iframe", function(b, c, d, e, f) {
- function m(a) {
- if (!a) return;
- return a.lang ? a.lang : m(a.parentNode)
- }
- function n() {
- var a = i.widgets,
- b, c;
- for (var e in a) {
- e.match(/\./) ? b = d.apply(this, e.split(".")) : b = document.getElementsByTagName(e);
- for (var f = 0, g; g = b[f]; f++) {
- if (g.getAttribute("data-twttr-rendered")) continue;
- g.setAttribute("data-twttr-rendered", "true"), c = new a[e](g), j.list.push(c), j.byId[c.id] = c, c.render(i)
- }
- }
- }
- function o(a) {
- i = a
- }
- function p() {
- n()
- }
- function q(a) {
- return a && j.byId[a] ? j.byId[a].element : null
- }
- var g = 0,
- h, i, j = {
- list: [],
- byId: {}
- },
- k = {
- ko: {
- "%{followers_count} followers": "%{followers_count}명의 팔로워",
- "100K+": "100만 이상",
- "10k unit": "만 단위",
- Follow: "팔로우",
- "Follow %{screen_name}": "%{screen_name} 팔로우하기",
- K: "천",
- M: "백만",
- Tweet: "트윗",
- "Tweet %{hashtag}": "%{hashtag} 관련 트윗하기",
- "Tweet to %{name}": "%{name}님에게 트윗하기"
- },
- no: {
- "%{followers_count} followers": "%{followers_count} føgere",
- "100K+": "100K+",
- "10k unit": "10k ",
- Follow: "Følg",
- "Follow %{screen_name}": "Følg %{screen_name}",
- K: "K",
- M: "M",
- Tweet: "Tweet",
- "Tweet %{hashtag}": "Tweet %{hashtag}",
- "Tweet to %{name}": "Send tweet til %{name}"
- },
- fil: {
- "%{followers_count} followers": "%{followers_count} mga tagasunod",
- "100K+": "100K+",
- "10k unit": "10k yunit",
- Follow: "Sundan",
- "Follow %{screen_name}": "Sundan si %{screen_name}",
- K: "K",
- M: "M",
- Tweet: "I-tweet",
- "Tweet %{hashtag}": "I-tweet ang %{hashtag}",
- "Tweet to %{name}": "Mag-Tweet kay %{name}"
- },
- sv: {
- "%{followers_count} followers": "%{followers_count} följare",
- "100K+": "100K+",
- "10k unit": "10k",
- Follow: "Följ",
- "Follow %{screen_name}": "Följ %{screen_name}",
- K: "K",
- M: "M",
- Tweet: "Tweeta",
- "Tweet %{hashtag}": "Tweeta %{hashtag}",
- "Tweet to %{name}": "Tweeta till %{name}"
- },
- nl: {
- "%{followers_count} followers": "%{followers_count} volgers",
- "100K+": "100k+",
- "10k unit": "10k-eenheid",
- Follow: "Volgen",
- "Follow %{screen_name}": "%{screen_name} volgen",
- K: "k",
- M: " mln.",
- Tweet: "Tweeten",
- "Tweet %{hashtag}": "%{hashtag} tweeten",
- "Tweet to %{name}": "Tweeten naar %{name}"
- },
- es: {
- "%{followers_count} followers": "%{followers_count} seguidores",
- "100K+": "100K+",
- "10k unit": "10k unidad",
- Follow: "Seguir",
- "Follow %{screen_name}": "Seguir a %{screen_name}",
- K: "K",
- M: "M",
- Tweet: "Twittear",
- "Tweet %{hashtag}": "Twittear %{hashtag}",
- "Tweet to %{name}": "Twittear a %{name}"
- },
- hu: {
- "%{followers_count} followers": "%{followers_count} követő",
- "100K+": "100E+",
- "10k unit": "10E+",
- Follow: "Követés",
- "Follow %{screen_name}": "%{screen_name} követése",
- K: "E",
- M: "M",
- Tweet: "Tweet",
- "Tweet %{hashtag}": "%{hashtag} tweetelése",
- "Tweet to %{name}": "Tweet küldése neki: %{name}"
- },
- hi: {
- "%{followers_count} followers": "%{followers_count} फ़ॉलोअर्स",
- "100K+": "१०० हजार+",
- "10k unit": "१० हजार इकाईयां",
- Follow: "फ़ॉलो",
- "Follow %{screen_name}": "%{screen_name} को फ़ॉलो करें",
- K: "हजार",
- M: "१० लाख",
- Tweet: "ट्वीट",
- "Tweet %{hashtag}": "ट्वीट %{hashtag}",
- "Tweet to %{name}": "%{name} को ट्वीट करें"
- },
- ja: {
- "%{followers_count} followers": "%{followers_count}人のフォロワー",
- "100K+": "10万以上",
- "10k unit": "万",
- Follow: "フォローする",
- "Follow %{screen_name}": "%{screen_name}をフォロー",
- K: "K",
- M: "M",
- Tweet: "ツイート",
- "Tweet %{hashtag}": "%{hashtag} をツイートする",
- "Tweet to %{name}": "%{name}へツイートする"
- },
- da: {
- "%{followers_count} followers": "%{followers_count} følgere",
- "100K+": "100K+",
- "10k unit": "10k enhed",
- Follow: "Følg",
- "Follow %{screen_name}": "Følg %{screen_name}",
- K: "K",
- M: "M",
- Tweet: "Tweet",
- "Tweet %{hashtag}": "Tweet %{hashtag}",
- "Tweet to %{name}": "Tweet til %{name}"
- },
- ur: {
- "%{followers_count} followers": "%{followers_count} فالورز",
- "100K+": "1 لاکھ+",
- "10k unit": "دس ہزار یونٹ",
- Follow: "فالو کریں",
- "Follow %{screen_name}": "%{screen_name} کو فالو کریں",
- K: "ہزار",
- M: "ملین",
- Tweet: "ٹویٹ کریں",
- "Tweet %{hashtag}": "ٹویٹ کریں %{hashtag}",
- "Tweet to %{name}": "%{name} کو ٹویٹ کریں"
- },
- he: {
- "%{followers_count} followers": "%{followers_count} עוקבים",
- "100K+": "מאות אלפים",
- "10k unit": "עשרות אלפים",
- Follow: "מעקב",
- "Follow %{screen_name}": "לעקוב אחר %{screen_name}",
- K: "אלף",
- M: "מיליון",
- Tweet: "ציוץ",
- "Tweet %{hashtag}": "צייצו %{hashtag}",
- "Tweet to %{name}": "ציוץ אל %{name}"
- },
- pt: {
- "%{followers_count} followers": "%{followers_count} seguidores",
- "100K+": "+100 mil",
- "10k unit": "10 mil unidades",
- Follow: "Seguir",
- "Follow %{screen_name}": "Seguir %{screen_name}",
- K: "Mil",
- M: "M",
- Tweet: "Tweetar",
- "Tweet %{hashtag}": "Tweetar %{hashtag}",
- "Tweet to %{name}": "Tweetar para %{name}"
- },
- ru: {
- "%{followers_count} followers": "Читатели: %{followers_count} ",
- "100K+": "100 тыс.+",
- "10k unit": "блок 10k",
- Follow: "Читать",
- "Follow %{screen_name}": "Читать %{screen_name}",
- K: "тыс.",
- M: "млн.",
- Tweet: "Твитнуть",
- "Tweet %{hashtag}": "Твитнуть %{hashtag}",
- "Tweet to %{name}": "Твитнуть %{name}"
- },
- "zh-cn": {
- "%{followers_count} followers": "%{followers_count} 关注者",
- "100K+": "10万+",
- "10k unit": "1万单元",
- Follow: "关注",
- "Follow %{screen_name}": "关注 %{screen_name}",
- K: "千",
- M: "百万",
- Tweet: "发推",
- "Tweet %{hashtag}": "以 %{hashtag} 发推",
- "Tweet to %{name}": "发推给 %{name}"
- },
- "zh-tw": {
- "%{followers_count} followers": "%{followers_count} 位跟隨者",
- "100K+": "超過十萬",
- "10k unit": "1萬 單位",
- Follow: "跟隨",
- "Follow %{screen_name}": "跟隨 %{screen_name}",
- K: "千",
- M: "百萬",
- Tweet: "推文",
- "Tweet %{hashtag}": "推文%{hashtag}",
- "Tweet to %{name}": "推文給%{name}"
- },
- ar: {
- "%{followers_count} followers": "عدد المتابعين %{followers_count}",
- "100K+": "+100 ألف",
- "10k unit": "10 آلاف وحدة",
- Follow: "تابع",
- "Follow %{screen_name}": "تابع %{screen_name}",
- K: "ألف",
- M: "مليون",
- Tweet: "غرِّد",
- "Tweet %{hashtag}": "غرِّد %{hashtag}",
- "Tweet to %{name}": "غرِّد لـ %{name}"
- },
- it: {
- "%{followers_count} followers": "%{followers_count} follower",
- "100K+": "100K+",
- "10k unit": "10k unità",
- Follow: "Segui",
- "Follow %{screen_name}": "Segui %{screen_name}",
- K: "K",
- M: "M",
- Tweet: "Tweet",
- "Tweet %{hashtag}": "Twitta %{hashtag}",
- "Tweet to %{name}": "Twitta a %{name}"
- },
- id: {
- "%{followers_count} followers": "%{followers_count} pengikut",
- "100K+": "100 ribu+",
- "10k unit": "10 ribu unit",
- Follow: "Ikuti",
- "Follow %{screen_name}": "Ikuti %{screen_name}",
- K: " ribu",
- M: " juta",
- Tweet: "Tweet",
- "Tweet %{hashtag}": "Tweet %{hashtag}",
- "Tweet to %{name}": "Tweet ke %{name}"
- },
- tr: {
- "%{followers_count} followers": "%{followers_count} takipçi",
- "100K+": "+100 bin",
- "10k unit": "10 bin birim",
- Follow: "Takip et",
- "Follow %{screen_name}": "Takip et: %{screen_name}",
- K: "bin",
- M: "milyon",
- Tweet: "Tweetle",
- "Tweet %{hashtag}": "Tweetle: %{hashtag}",
- "Tweet to %{name}": "Tweetle: %{name}"
- },
- fr: {
- "%{followers_count} followers": "%{followers_count} abonnés",
- "100K+": "100K+",
- "10k unit": "unité de 10k",
- Follow: "Suivre",
- "Follow %{screen_name}": "Suivre %{screen_name}",
- K: "K",
- M: "M",
- Tweet: "Tweeter",
- "Tweet %{hashtag}": "Tweeter %{hashtag}",
- "Tweet to %{name}": "Tweeter à %{name}"
- },
- fi: {
- "%{followers_count} followers": "%{followers_count} seuraajaa",
- "100K+": "100 000+",
- "10k unit": "10 000 yksikköä",
- Follow: "Seuraa",
- "Follow %{screen_name}": "Seuraa käyttäjää %{screen_name}",
- K: "tuhatta",
- M: "milj.",
- Tweet: "Twiittaa",
- "Tweet %{hashtag}": "Twiittaa %{hashtag}",
- "Tweet to %{name}": "Twiittaa käyttäjälle %{name}"
- },
- fa: {
- "%{followers_count} followers": "%{followers_count} دنبالکننده",
- "100K+": ">۱۰۰هزار",
- "10k unit": "۱۰هزار واحد",
- Follow: "دنبال کردن",
- "Follow %{screen_name}": "دنبال کردن %{screen_name}",
- K: "هزار",
- M: "میلیون",
- Tweet: "توییت",
- "Tweet %{hashtag}": "توییت کردن %{hashtag}",
- "Tweet to %{name}": "به %{name} توییت کنید"
- },
- th: {
- "%{followers_count} followers": "%{followers_count} ผู้ติดตาม",
- "100K+": "100พัน+",
- "10k unit": "หน่วย 10พัน",
- Follow: "ติดตาม",
- "Follow %{screen_name}": "ติดตาม %{screen_name}",
- K: "พัน",
- M: "ล้าน",
- Tweet: "ทวีต",
- "Tweet %{hashtag}": "ทวีต %{hashtag}",
- "Tweet to %{name}": "ทวีตถึง %{name}"
- },
- msa: {
- "%{followers_count} followers": "%{followers_count} pengikut",
- "100K+": "100 ribu+",
- "10k unit": "10 ribu unit",
- Follow: "Ikut",
- "Follow %{screen_name}": "Ikut %{screen_name}",
- K: "ribu",
- M: "juta",
- Tweet: "Tweet",
- "Tweet %{hashtag}": "Tweet %{hashtag}",
- "Tweet to %{name}": "Tweet kepada %{name}"
- },
- pl: {
- "%{followers_count} followers": "%{followers_count} obserwujących",
- "100K+": "100 tys.+",
- "10k unit": "10 tys.",
- Follow: "Obserwuj",
- "Follow %{screen_name}": "Obserwuj %{screen_name}",
- K: "tys.",
- M: "mln",
- Tweet: "Tweetnij",
- "Tweet %{hashtag}": "Tweetnij %{hashtag}",
- "Tweet to %{name}": "Tweetnij do %{name}"
- },
- de: {
- "%{followers_count} followers": "%{followers_count} Follower",
- "100K+": "100Tsd+",
- "10k unit": "10tsd-Einheit",
- Follow: "Folgen",
- "Follow %{screen_name}": "%{screen_name} folgen",
- K: "Tsd",
- M: "M",
- Tweet: "Twittern",
- "Tweet %{hashtag}": "Tweet %{hashtag}",
- "Tweet to %{name}": "Tweet an %{name}"
- }
- },
- l = function() {};
- b.aug(l.prototype, {
- setLanguage: function(a) {
- var b;
- a || (a = this.params().lang || this.originElement.getAttribute("data-lang") || m(this.originElement)), a = a && a.toLowerCase();
- if (!a) return this.lang = "en";
- if (k[a]) return this.lang = a;
- b = a.replace(/[-_].*/, "");
- if (k[b]) return this.lang = b;
- this.lang = "en"
- },
- _: function(a, b) {
- var c = this.lang;
- b = b || {};
- if (!c || !k.hasOwnProperty(c)) c = this.lang = "en";
- return a = k[c] && k[c][a] || a, this.ringo(a, b, /%\{([\w_]+)\}/g)
- },
- ringo: function(a, b, c) {
- return c = c || /\{\{([\w_]+)\}\}/g, a.replace(c, function(a, c) {
- return b[c] !== undefined ? b[c] : a
- })
- },
- add: function(a) {
- j.list.push(this), j.byId[this.id] = a
- },
- create: function(a, b, c, d) {
- return this.id = this.generateId(), f({
- url: a,
- css: {
- width: c[0] + (typeof c[0] != "string" ? "px" : ""),
- height: c[1] + (typeof c[1] != "string" ? "px" : "")
- },
- className: b,
- id: this.id,
- attributes: d,
- replace: this.originElement
- })
- },
- params: function() {
- var a = this.originElement.href && this.originElement.href.split("?")[1],
- b = a ? e.decode(a) : {};
- return (this.params = function() {
- return b
- })()
- },
- dataAttr: function(a) {
- return this.originElement.getAttribute("data-" + a)
- },
- generateId: function() {
- return this.originElement.id || "twitter-widget-" + g++
- },
- styles: {
- base: "font: normal normal normal 11px/18px 'Helvetica Neue', Arial, sans-serif; margin: 0; padding: 0; white-space: nowrap;",
- button: "font-weight: bold; text-shadow: 0 1px 0 rgba(255,255,255,.5);",
- large: "font-size: 13px; line-height: 26px;",
- vbubble: "font-size: 16px;"
- },
- width: function() {
- throw new Error(name + " not implemented")
- },
- height: function() {
- return this.size == "m" ? 20 : 28
- },
- dimensions: function() {
- return [this.width(), this.height()]
- }
- }), a({
- Base: l,
- init: o,
- embed: p,
- find: q,
- TWITTER_PROFILE_URL: /^https?\:\/\/(?:www\.)?twitter\.com\/(?:#!?\/)?([\w_]{1,20})\/?$/
- })
- })
- });
- provide("util/events", function(a) {
- using("util/util", function(b) {
- function d() {
- this.completed = !1, this.callbacks = []
- }
- var c = {
- bind: function(a, b) {
- return this._handlers = this._handlers || {}, this._handlers[a] = this._handlers[a] || [], this._handlers[a].push(b)
- },
- unbind: function(a, c) {
- if (!this._handlers[a]) return;
- if (c) {
- var d = b.indexOf(this._handlers[a], c);
- d >= 0 && this._handlers[a].splice(d, 1)
- } else this._handlers[a] = []
- },
- trigger: function(a, b) {
- var c = this._handlers && this._handlers[a];
- b.type = a;
- if (c) for (var d = 0, e; e = c[d]; d++) e.call(this, b)
- }
- };
- d.prototype.addCallback = function(a) {
- this.completed ? a.apply(this, this.results) : this.callbacks.push(a)
- }, d.prototype.complete = function() {
- this.results = makeArray(arguments), this.completed = !0;
- for (var a = 0, b; b = this.callbacks[a]; a++) b.apply(this, this.results)
- }, a({
- Emitter: c,
- Promise: d
- })
- })
- });
- provide("util/uri", function(a) {
- using("util/querystring", "util/util", function(b, c) {
- function d(a) {
- var b;
- return a.match(/^https?:\/\//) ? a : (b = location.host, location.port.length > 0 && (b += ":" + location.port), [location.protocol, "//", b, a].join(""))
- }
- function e() {
- var a = document.getElementsByTagName("link");
- for (var b = 0, c; c = a[b]; b++) if (c.getAttribute("rel") == "canonical") return d(c.getAttribute("href"));
- return null
- }
- function f() {
- var a = document.getElementsByTagName("a"),
- b = document.getElementsByTagName("link"),
- d = /\bme\b/,
- e = /^https?\:\/\/(www\.)?twitter.com\/([a-zA-Z0-9_]+)$/,
- f = c.array(a).concat(c.array(b)),
- g, h, i;
- for (var j = 0, k; k = f[j]; j++) {
- h = k.getAttribute("rel"), i = k.getAttribute("href");
- if (h && i && h.match(d) && (g = i.match(e))) return g[2]
- }
- }
- a({
- absolutize: d,
- getCanonicalURL: e,
- getScreenNameFromPage: f
- })
- })
- });
- provide("tfw/widget/intent", function(a) {
- using("util/util", "tfw/widget/base", "util/querystring", "util/uri", function(b, c, d, e) {
- function m(a) {
- var b = Math.round(k / 2 - h / 2),
- c = 0;
- j > i && (c = Math.round(j / 2 - i / 2)), window.open(a, "intent", g + ",width=" + h + ",height=" + i + ",left=" + b + ",top=" + c)
- }
- function n(a, b) {
- using("tfw/widget/hubclient", function(c) {
- c.openIntent(a, b)
- })
- }
- function o(a) {
- var b = "original_referer=" + location.href;
- return [a, b].join(a.indexOf("?") == -1 ? "?" : "&")
- }
- function q(a) {
- a = a || window.event;
- var b = a.target || a.srcElement,
- c, d;
- while (b && b.nodeName.toLowerCase() !== "a") b = b.parentNode;
- if (b && b.nodeName.toLowerCase() === "a" && b.href) {
- c = b.href.match(f);
- if (c) {
- var e = o(b.href);
- e = e.replace(/^http[:]/, "https:"), e = e.replace(/^\/\//, "https://"), twttr.events.hub ? (d = new p(l.generateId(), b), l.add(d), n(e, b), twttr.events.trigger("click", {
- target: b,
- region: "intent",
- type: "click",
- data: {}
- })) : m(e), a.returnValue = !1, a.preventDefault && a.preventDefault()
- }
- }
- }
- var f = /twitter\.com(\:\d{2,4})?\/intent\/(\w+)/,
- g = "scrollbars=yes,resizable=yes,toolbar=no,location=yes",
- h = 550,
- i = 520,
- j = screen.height,
- k = screen.width,
- l, p = function(a, b) {
- this.id = a, this.element = this.originElement = b
- },
- r = function(a) {
- this.originElement = [], this.element = a
- };
- r.prototype = new c.Base, b.aug(r.prototype, {
- render: function(a) {
- l = this, window.__twitterIntentHandler || (document.addEventListener ? document.addEventListener("click", q, !1) : document.attachEvent && document.attachEvent("onclick", q), window.__twitterIntentHandler = !0)
- }
- }), a({
- Listener: r
- })
- })
- });
- provide("lib/twt", function(a) {
- a(function(a, b) {
- var c = a != "en" ? a + "." : "";
- using("$vendor/twt/dist/twt." + c + "min.js", function() {
- twt.settings.lang = a, b(twt)
- })
- })
- });
- provide("util/decider", function(a) {
- function c(a) {
- var c = b[a] || !1;
- if (!c) return !1;
- if (c === !0 || c === 100) return !0;
- var d = Math.random() * 100,
- e = c >= d;
- return b[a] = e, e
- }
- var b = {
- force_new_cookie: 100,
- decider_fixture: 12.34
- };
- a({
- isAvailable: c
- })
- });
- provide("util/params", function(a) {
- using("util/querystring", function(b) {
- var c = function(a) {
- var c = a.search.substr(1);
- return b.decode(c)
- },
- d = function(a) {
- var c = a.href,
- d = c.indexOf("#"),
- e = d < 0 ? "" : c.substring(d + 1);
- return b.decode(e)
- },
- e = function(a) {
- var b = {},
- e = c(a),
- f = d(a);
- for (var g in e) e.hasOwnProperty(g) && (b[g] = e[g]);
- for (var g in f) f.hasOwnProperty(g) && (b[g] = f[g]);
- return b
- };
- a({
- combined: e,
- fromQuery: c,
- fromFragment: d
- })
- })
- });
- provide("tfw/widget/env", function(a) {
- using("util/params", function(b) {
- function d() {
- var a = 36e5,
- d = b.combined(document.location)._;
- return c !== undefined ? c : (c = !1, d && /^\d+$/.test(d) && (c = +(new Date) - parseInt(d) < a), c)
- }
- var c;
- a({
- isDynamicWidget: d
- })
- })
- });
- provide("dom/cookie", function(a) {
- using("util/util", function(b) {
- a(function(a, c, d) {
- var e = b.aug({}, d);
- if (arguments.length > 1 && String(c) !== "[object Object]") {
- if (c === null || c === undefined) e.expires = -1;
- if (typeof e.expires == "number") {
- var f = e.expires,
- g = new Date((new Date).getTime() + f * 60 * 1e3);
- e.expires = g
- }
- return c = String(c), document.cookie = [encodeURIComponent(a), "=", e.raw ? c : encodeURIComponent(c), e.expires ? "; expires=" + e.expires.toUTCString() : "", e.path ? "; path=" + e.path : "", e.domain ? "; domain=" + e.domain : "", e.secure ? "; secure" : ""].join("")
- }
- e = c || {};
- var h, i = e.raw ?
- function(a) {
- return a
- } : decodeURIComponent;
- return (h = (new RegExp("(?:^|; )" + encodeURIComponent(a) + "=([^;]*)")).exec(document.cookie)) ? i(h[1]) : null
- })
- })
- });
- provide("util/donottrack", function(a) {
- using("dom/cookie", function(b) {
- a(function() {
- return b("dnt") ? !0 : document.navigator ? document.navigator["doNotTrack"] == 1 : navigator ? navigator["doNotTrack"] == 1 || navigator["msDoNotTrack"] == 1 : !1
- })
- })
- });
- provide("tfw/widget/guest_cookie", function(a) {
- using("dom/cookie", "util/donottrack", "util/decider", function(b, c, d) {
- function f() {
- var a = b(e) || !1;
- if (!a) return;
- a.match(/^v3\:/) || g()
- }
- function g() {
- b(e) && b(e, null, {
- domain: ".twitter.com",
- path: "/"
- })
- }
- function h() {
- c() && g()
- }
- var e = "pid";
- a({
- set: h,
- destroy: g,
- forceNewCookie: f,
- guest_id_cookie: e
- })
- })
- });
- provide("tfw/widget/tracking", function(a) {
- using("dom/cookie", "util/donottrack", "tfw/widget/guest_cookie", "tfw/widget/env", "util/decider", function(b, c, d, e, f) {
- function i(a, b, c) {
- var d = g + b;
- if (!a) return;
- return a[d] = c, a
- }
- function j(a, f, g, j, k) {
- j || (j = !1), k || (k = !1), f || (f = {}), g = g || "tweetbutton";
- var l = h[g] || h.tweetbutton,
- m = a.ownerDocument.createElement("img"),
- n = [];
- j || (i(f, "referrer", document.referrer.toString()), i(f, "widget", +e.isDynamicWidget()), !k && !c() ? (i(f, "li", + !! b("twid")), i(f, d.guest_id_cookie, b(d.guest_id_cookie) || "")) : i(f, "dnt", "1"));
- for (var o in f) if (f.hasOwnProperty(o)) {
- var p = encodeURIComponent(o),
- q = encodeURIComponent(f[o]);
- q = q.replace(/'/g, "%27"), n.push(p + "=" + q)
- }
- m.src = l + "?" + n.join("&"), m.alt = "", m.style.position = "absolute", m.style.height = "1px", m.style.width = "1px", m.style.top = "-9999px", m.style.left = "-9999px", a.appendChild(m);
- if (g == "tweetembed") {
- var r = {
- twttr_referrer: "referrer",
- twttr_variant: "version",
- lang: "language",
- screen_name: "screen_name"
- },
- s = {
- _category_: "tfw_widgets",
- event_name: g + ":impression"
- };
- for (var o in f) {
- var t = r[o];
- t && (s[t] = f[o])
- }!k && !c() && (f.twttr_li && (s.logged_in = f["twttr_li"] == "1"), s.pid = b(d.guest_id_cookie) || ""), f.status_id && (s.tweet_ids = [f.status_id]), f.twttr_widget && (s.widget = f["twttr_widget"] == "1");
- var m = a.ownerDocument.createElement("img"),
- u = "//r.twimg.com/jot?l=" + encodeURIComponent(JSON.stringify(s)).replace(/'/g, "%27");
- if (k || c()) u += "&dnt=1";
- m.src = u, m.alt = "", m.style.position = "absolute", m.style.height = "1px", m.style.width = "1px", m.style.top = "-9999px", m.style.left = "-9999px", a.appendChild(m)
- }
- }
- var g = "twttr_",
- h = {
- tweetbutton: "//p.twitter.com/t.gif",
- followbutton: "//p.twitter.com/f.gif",
- tweetembed: "//p.twitter.com/e.gif"
- };
- f.isAvailable("force_new_cookie") && d.forceNewCookie(), a({
- addPixel: j,
- addVar: i
- })
- })
- });
- provide("util/tweetparser", function(a) {
- using("util/util", function(b) {
- function g(a, c) {
- var d = document.getElementsByTagName(a),
- e = b.filter(d, function(a) {
- return b.containsElement(c, a)
- });
- return e || []
- }
- function h(a) {
- return a && c.test(a) && RegExp.$1
- }
- …
Large files files are truncated, but you can click here to view the full file