-
-
Save makotom/1096454 to your computer and use it in GitHub Desktop.
(function(){ | |
// if(location.toString().match(/^https?:\/\/[^\/.]+\.google\.com\//)){ // It does affect all Google pages? | |
if(location.toString().match(/^https?:\/\/plus\.google\.com\//)){ | |
history.replaceStateOriginal = history.replaceState; | |
history.replaceState = function(state, title, url){ | |
if(url !== location.toString() && url !== location.pathname){ | |
if(!state){ | |
location.href = url; | |
}else{ | |
history.replaceStateOriginal(state, title, url); | |
} | |
} | |
}; | |
} | |
})(); |
@XP1
Yes :)
@makotom, would you like to look at my code for my Google+ Injector User JS and then try it out?
Google uses unnecessary, server-side browser sniffing to send Opera a crippled webpage, missing CSS, HTML, and JavaScript, which, in effect, do not include web toolbar buttons and advanced feedback features.
That is why I created a User JS and extension for Google+ that will inject the missing HTML, CSS, and JavaScript so that the web toolbar notification and share buttons will work correctly.
I posted about it here in the My Opera forums:
http://my.opera.com/community/forums/findpost.pl?id=9922772
Google+ Injector:
https://github.com/XP1/Google--for-Opera/
For the User JS, click on the file and then click "raw".
For the extension, click "Downloads" and then install "googlePlusInjector-1.03.oex".
If you use the User JS, "User JavaScript on HTTPS" must be enabled, and you will get an HTTPS warning for each browsing session.
opera:config#User%20JavaScript%20on%20HTTPS or opera:config#UserPrefs|UserJavaScriptonHTTPS
If you use the extension, "User JavaScript on HTTPS" does not have to be enabled, so you will not get an HTTPS warning for each browsing session. However, for extensions, "Allow interaction with secure pages" must be enabled.
Known issues:
Webpages, like "https://plus.google.com/photos/" and "https://plus.google.com/circles/", do not have the notification and share text, so there is no way to get the the notification and share text for non-English languages. For these webpages, they will always show as "Notifications" and "Share", unless you edit the User JS.
Also, try out my Google +1 Button extension. My extension will let you +1 a webpage even if it lacks +1 buttons.
https://github.com/XP1/Google--1-Button-extension-for-Opera/
Click "Downloads" and then install "googlePlusOneButton-1.01.oex".
I'm interested if you have any comments about the code or how it can be improved. Thanks.
@makotom, interesting. Is this why when you go to the main stream (Google+ homepage), Opera will sometimes try to load the stream forever, thus the white space where the stream is?