RequestReduce + JQuery + Opera = Javascript error
RequestReduce + JQuery 1.7.1 (and possibly other versions) produces javascript that does not work in Opera.
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="RequestReduce.aspx.cs" Inherits="RequestReduce" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
<script type="text/javascript" src="/js/jquery-1.7.1.js"></script>
</head>
<body>
<div>
JQuery test
</div>
</body>
<script type="text/javascript">
$(document).ready(function () {
alert('Working');
});
</script>
</html>
This works fine in Chrome, IE, Safari, Firefox.
But when opening this page in Opera I get this error:
Syntax error at line 16 while loading: expected ')', got keyword 'in' or(i.isArray(t)||(t in e?t=[t]:(t=i.came --------------------^
Screenshot: http://screencast.com/t/TiWElrI4w Screenshot: http://screencast.com/t/6e8MRoMC9Qo
I temporarily got around the problem by adding this to my Global.asax ApplicationStartup method:
RequestReduce.Api.Registry.AddFilter(new RequestReduce.Api.JavascriptFilter(x => x.FilteredUrl.ToLower().Contains("jquery"))); //Due to Opera
(Yes - the page works fine in Opera when I disable RequestReduce)
I'm having a similar issue with IE9 (didn't check other browsers) & bpopup * @author: (c)Bjoern Klinggaard (http://dinbror.dk/bpopup - twitter@bklinggaard)
I exluded the file (jquery.bpopup-0.7.0.min.js) and it is fine.
it complains at some point that bPopup is not defined.