Callback popup

by AnthraxisBR

JavaScript

var opener = {

    popup: null,

    callback: function(URL) {
        this.popup = window.open(URL);
        var self = this;
        this.popup.onload = function() {
			    this.querySelector('span.RveJvd').click();
        };
    },
    openPopUp: function() {
    		this.callback('https://plus.google.com/share?url=http://www.example.com');
        console.log(this, this.popup);
    }
}
 
 opener.openPopUp();