14 lines
569 B
JavaScript
14 lines
569 B
JavaScript
|
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'));
|
|||
|
|
|||
|
};
|
|||
|
});
|