Since the URL is known, it is quite simple:
JSON.parse( document.querySelector("script[src='https://apis.google.com/js/plusone.js']") .innerHTML.replace(/^\s+|\s+$/g,'') );
However, as Alohchi noted in the comments, the last script on the page will be the last to load when the script starts, because (unless otherwise specified) the scripts are blocked. Therefore, this will work:
var scripts = document.getElementsByTagName('script'); var data = JSON.parse(scripts[scripts.length-1].innerHTML.replace(/^\s+|\s+$/g,''));
source share