-
Notifications
You must be signed in to change notification settings - Fork 1
/
googleplus.js
52 lines (40 loc) · 1.25 KB
/
googleplus.js
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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
(function(){
var pluginName = "googleplus";
var plugin = function(){
// Internationalisation
AtKit.addLocalisationMap("en", {
"googleplus_title" : "Share to Google Plus"
});
// Google Plus
AtKit.addButton(
'googleplus',
AtKit.localisation("googleplus_title"),
AtKit.getPluginURL() + 'images/google-plus.png',
function(dialogs, functions){
var a=window,
b=document,
c=encodeURIComponent,
d=a.open("https://m.google.com/app/plus/x/?v=compose&hideloc=1&content="+c(b.title)+" - "+c(b.location),"Share to Google+","left="+(screen.availWidth/2-225)+",top="+(screen.availHeight/2-150)+",height=300px,width=450px,resizable=1,alwaysRaised=1");
a.setTimeout(function(){d.focus()},300)
},
null, null
);
};
if(typeof window['AtKit'] == "undefined"){
window.AtKitLoaded = function(){
var eventAction = null;
this.subscribe = function(fn) {
eventAction = fn;
};
this.fire = function(sender, eventArgs) {
if (eventAction != null) {
eventAction(sender, eventArgs);
}
};
}
window['AtKitLoaded'] = new AtKitLoaded();
window['AtKitLoaded'].subscribe(function(){ AtKit.registerPlugin(pluginName, plugin); });
} else {
AtKit.registerPlugin(pluginName, plugin);
}
})();