I had the problem that Google Spreadsheets isn’t working properly in Opera 9.5.
In Internet Explorer and Firefox it works fine, but not in Opera.
I found the solution at the guys from CodeUtopia.
It seems that the javascript button saying that Google Spreadsheets only supports Internet Explorer and Firefox never returns the value of the confirmation box back to the webpage, so Google Spreadsheets always thinks that you’ve clicked Cancel!
CodeUtopia is raising the question if Google only tests their software on Internet Explorer and Firefox, or also other browsers.
CodeUtopia offers a solution for the problem; you can use their UserJS file which will fix your problem so you van use Google Spreadsheets also in Opera:
// ==UserScript==
// @include http://*.spreadsheets.google.com/*
// @include https://*.spreadsheets.google.com/*
// @include http://spreadsheets.google.com/*
// @include https://spreadsheets.google.com/*
// ==/UserScript==
(function(){
if(navigator.userAgent.indexOf('Opera') != -1)
{
alert('Google Spreadsheets is blocking Opera. \nDo the following to fix it:\n\n' +
'1. Right click the page and choose Edit Site Preferences\n' +
'2. Choose the Network tab\n' +
'3. From Browser identification, choose Mask as Firefox\n' +
'4. Reload the page');
return;
}
//Attempt to repair Spreadsheets' browser detection
window.opera.addEventListener('AfterScript',function(ev){
if(!ev.element.src ||
ev.element.src.indexOf('trix_core.js') == -1)
{
return;
}
var func = getBrokenFunction(ev.element.text);
if(func == null)
return;
window.opera.defineMagicFunction(func, function(){
return true;
});
}, false);
//Fix buggy cell editor style
window.addEventListener('DOMContentLoaded', function(ev){
var style = document.createElement('style');
style.setAttribute('type', 'text/css');
var css = '.editBoxWrapper { overflow: hidden !important; }';
style.innerHTML = css;
document.getElementsByTagName('head')[0].appendChild(style);
}, false);
/**
* Attempts to locate the broken function in the spreadsheets
* code that's breaking Opera support
* @param string code
* @return string|null function name or null on failure
*/
function getBrokenFunction(code)
{
var rex = new RegExp(
'_getInstanceOfApp\([^)]+\)[^{]*\{' + //Match start of function
'[^}]+' + //Match function contents
'\}', //Match function end
'm');
var match = rex.exec(code);
if(!match)
return null;
var funcStr = match[0];
rex = /if\(([^(]+)/im; //Match if clause and a function name inside it
match = rex.exec(funcStr);
if(!match[1])
return null;
return match[1];
}
})();
Related posts:
- Load jQuery from Google Code for caching! Why use your own copy of jQuery, use the one...
- Asynchronous Tracking with Google Analytics Today we’re excited to announce our new Google Analytics Asynchronous...
- Google Tech Support away with Christmas Whenever I go home to visit my parents, I always...
- Use compression to make your site faster! Every day, more than 99 human years are wasted because...
- New Google Service: Google Browser Size Google Browser Size is an experimental service that shows if...
Related posts brought to you by Yet Another Related Posts Plugin.
Google Spreadsheets do not work properly in Opera…
Quick guide on how to get Google Spreadsheets working in Opera!…