Skip to content

Instantly share code, notes, and snippets.

@XP1
Created March 22, 2012 08:59
Show Gist options
  • Save XP1/2157236 to your computer and use it in GitHub Desktop.
Save XP1/2157236 to your computer and use it in GitHub Desktop.
Fix Ace: Fixes Ace's "attachEvent" feature detection in Opera.
// ==UserScript==
// @name Fix Ace
// @version 1.00
// @description Fixes Ace's "attachEvent" feature detection in Opera.
// @author XP1 (https://github.com/XP1/)
// @namespace https://gist.github.com/2157236/
// @include http*://udacity.com/*
// @include http*://*.udacity.com/*
// ==/UserScript==
/*jslint browser: true, vars: true, white: true, maxerr: 50, indent: 4 */
(function (HTMLTextAreaElement)
{
"use strict";
HTMLTextAreaElement.prototype.attachEvent = undefined;
}(this.HTMLTextAreaElement));
@XP1
Copy link
Author

XP1 commented Mar 22, 2012

@XP1
Copy link
Author

XP1 commented Mar 22, 2012

This problem has already been fixed in Ace's master branch:

https://github.com/ajaxorg/ace/blob/master/lib/ace/keyboard/textinput.js

Commit:
ajaxorg/ace@7b2ddf1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment