Light12306/Web12306/js/ui/ui_sns_share.js

14 lines
569 B
JavaScript
Raw Normal View History

define(function (require, exports, module) {
exports.makeWeiboShare = function (target, url, text, imageUrl) {
url = url || self.location + '';
((function (s, d, e, r, l, p, t, z, c) {
var f = 'http://v.t.sina.com.cn/share/share.php?',
u = z || d.location,
p = ['url=', e(u), '&title=', e(t || d.title), '&source=', e(r), '&sourceUrl=', e(l), '&content=', c || 'gb2312', '&pic=', e(p || '')].join('');
target.setAttribute("href", [f, p].join(''));
})(screen, document, encodeURIComponent, '', '', imageUrl || "", text, url, 'utf-8'));
};
});