blob: 4e5f8324badc5b01c794ac579c0427ca56f694ea (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
var ShareView = View.extend({
el: ".share",
events: {
"click #share_facebook": "facebook",
"click #share_twitter": "twitter",
},
initialize: function(opt){
this.parent = opt.parent
},
facebook: function (e) {
e.preventDefault()
var msg = $(".roomName").html() + " on VValls"
var url = "https://www.facebook.com/share.php?u=" + encodeURIComponent(window.location.origin + window.location.pathname) + "&t=" + encodeURIComponent(msg);
window.open(url, "_blank")
},
twitter: function (e) {
e.preventDefault()
var msg = $(".roomName").html() + " on VValls"
var url = "https://twitter.com/home?status=" + encodeURIComponent(window.location.origin + window.location.pathname + " " + msg);
window.open(url, "_blank")
},
embed: function (e) {
e.preventDefault()
},
})
|