share.js 6.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. (function() {
  2. function C() {
  3. var g = ".bshare-custom{font-size:13px;line-height:16px !important;}.bshare-custom.icon-medium{font-size:14px;line-height:20px !important;}.bshare-custom.icon-medium-plus,.bshare-custom.icon-large{font-size:16px;line-height:26px !important;}.bshare-custom.icon-large{line-height:44px !important;}.bshare-custom a{padding-left:19px;height:16px;_height:18px;text-decoration:none;display:none;zoom:1;vertical-align:middle;cursor:pointer;color:#333;margin-right:3px;-moz-opacity:1;-khtml-opacity:1;opacity:1;}.bshare-custom a:hover{text-decoration:underline;-moz-opacity:0.75;-khtml-opacity:0.75;opacity:0.75;}.bshare-custom.icon-medium a{padding-left:27px;height:24px;}.bshare-custom.icon-medium-plus a{padding-left:35px;height:32px;}.bshare-custom.icon-large a{padding-left:53px;height:50px;}.bshare-custom .bshare-more{padding-left:0 !important;color:#333 !important;" + c + ".bshare-custom #bshare-shareto{color:#333;text-decoration:none;font-weight:bold;margin-right:8px;" + c;
  4. for (b in d.pnMap) a = d.topMap[b],
  5. g += ".bshare-custom .bshare-" + b + '{background:url("' + p + (a ? l: b) + q + '")' + (a ? " no-repeat 0 " + a * D + "px;" + c: m) + ".bshare-custom.icon-medium .bshare-" + b + '{background:url("' + r + (a ? l: b) + '.gif")' + (a ? " no-repeat 0 " + a * E + "px;" + c: m) + ".bshare-custom.icon-medium-plus .bshare-" + b + '{background:url("' + s + (a ? l: b) + '.gif")' + (a ? " no-repeat 0 " + a * F + "px;" + c: m) + ".bshare-custom.icon-large .bshare-" + b + '{background:url("' + t + (a ? l: b) + '.gif")' + (a ? " no-repeat 0 " + a * G + "px;" + c: m);
  6. g += '.bshare-custom #bshare-more-icon,.bshare-custom .bshare-more-icon{background:url("' + p + "more" + q + '") no-repeat;padding-left:19px !important;}.bshare-custom.icon-medium #bshare-more-icon,.bshare-custom.icon-medium .bshare-more-icon{background:url("' + r + 'more.gif") no-repeat;padding-left:27px !important;}.bshare-custom.icon-medium-plus #bshare-more-icon,.bshare-custom.icon-medium-plus .bshare-more-icon{background:url("' + s + 'more.gif") no-repeat;padding-left:35px !important;}.bshare-custom.icon-large #bshare-more-icon,.bshare-custom.icon-large .bshare-more-icon{background:url("' + t + 'more.gif") no-repeat;padding-left:53px !important;}';
  7. for (b in y) e = H + y[b],
  8. g += ".bshare-custom .bshare-more." + e + "{background:url(" + p + e + q + ") no-repeat;}.bshare-custom.icon-medium a.bshare-more." + e + "{background:url(" + r + e + ".gif) no-repeat;}.bshare-custom.icon-medium-plus a.bshare-more." + e + "{background:url(" + s + e + ".gif) no-repeat;}.bshare-custom.icon-large a.bshare-more." + e + "{background:url(" + t + e + ".gif) no-repeat;}";
  9. g += ".bshare-custom .bshare-share-count{width:41px;background:transparent url(" + h + "counter_box_18.gif) no-repeat;height:18px;line-height:18px !important;color:#333;text-align:center;font:bold 11px Arial,\u5b8b\u4f53,sans-serif;zoom:1;_padding-top:2px;" + c + ".bshare-custom.icon-medium .bshare-share-count{width:45px;padding:0 0 0 2px;vertical-align:bottom;background:transparent url(" + h + "counter_box_24.gif) no-repeat;height:24px;color:#444;line-height:24px !important;text-align:center;font:bold 12px Arial,\u5b8b\u4f53,sans-serif;zoom:1;_padding-top:5px;" + c + ".bshare-custom.icon-medium-plus .bshare-share-count{width:60px !important;padding:0 0 0 3px;vertical-align:bottom;background:transparent url(" + h + "counter_box_32.gif) no-repeat;height:32px;line-height:32px !important;text-align:center;color:#444;font:normal 18px Arial,\u5b8b\u4f53,sans-serif;zoom:1;_padding-top:6px;" + c + ".bshare-custom.icon-large .bshare-share-count{width:94px !important;padding:0 0 0 5px;vertical-align:bottom;background:transparent url(" + h + "counter_box_50.gif) no-repeat;height:50px;line-height:50px !important;text-align:center;color:#444;font:normal 22px Arial,\u5b8b\u4f53,sans-serif;zoom:1;_padding-top:12px;" + c;
  10. j.loadStyle(g);
  11. if (!d.anchorsBinded) {
  12. d.anchorsBinded = !0;
  13. var u, v, z, k, g = function(a) {
  14. if (!a) a = w.event;
  15. if (u = a.target || a.srcElement) {
  16. v = u.className.split(" ");
  17. z = u.buttonIndex;
  18. for (f = 0; f < v.length; f++) if (i = v[f], /^bshare-/.test(i)) {
  19. k = i.slice(7);
  20. break
  21. }
  22. if (k) {
  23. if (k == "more") {
  24. if (n.pop == -2) return ! 1;
  25. d.more(a);
  26. a.preventDefault ? a.preventDefault() : a.returnValue = !1;
  27. return ! 1
  28. }
  29. d.share(a, k, z)
  30. }
  31. k = null;
  32. return ! 1
  33. }
  34. },
  35. B = j.getElem(A, "div", "bshare-custom"),
  36. x,
  37. o;
  38. for (f = 0; f < B.length; f++) {
  39. x = B[f].getElementsByTagName("a");
  40. for (i = 0; i < x.length; i++) o = x[i],
  41. o.buttonIndex = f,
  42. A.addEventListener ? o.addEventListener("click", g, !1) : o.attachEvent("onclick", g)
  43. }
  44. }
  45. }
  46. var w = window,
  47. j = w.bShareUtil,
  48. d = w.bShare,
  49. n = d.config,
  50. h = d.imageBasePath,
  51. A = document,
  52. p = h + "logos/s4/",
  53. r = h + "logos/m2/",
  54. s = h + "logos/mp2/",
  55. t = h + "logos/l3/",
  56. D = -18,
  57. E = -26,
  58. F = -34,
  59. G = -52,
  60. l = "sprite/top_logos_sprite",
  61. c = "*display:inline;display:inline-block;}",
  62. m = " no-repeat;" + c,
  63. f, i, b, a, q = j.isIe ? ".gif": ".png",
  64. H = "more-style-",
  65. e,
  66. y = ["android", "apple", "sharethis", "sharethis-orange", "addthis"];
  67. j.ready(function() {
  68. var a = function() {
  69. d.completed ? (C(), d.params.type != 15 && n.pop != -1 && !n.beta && !n.popjs && j.loadScript(d.jsBasePath + "styles/bshareS887.js?v=20160808")) : setTimeout(a, 50)
  70. };
  71. a()
  72. })
  73. })();