Author: lindner
Date: Sun Jul 24 07:49:15 2011
New Revision: 1150289
URL: http://svn.apache.org/viewvc?rev=1150289&view=rev
Log:
allow for getProxyUrl to be used and abused in type=url gadgets
Modified:
shindig/trunk/features/src/main/javascript/features/core.io/io.js
Modified: shindig/trunk/features/src/main/javascript/features/core.io/io.js
URL:
http://svn.apache.org/viewvc/shindig/trunk/features/src/main/javascript/features/core.io/io.js?rev=1150289&r1=1150288&r2=1150289&view=diff
==============================================================================
--- shindig/trunk/features/src/main/javascript/features/core.io/io.js (original)
+++ shindig/trunk/features/src/main/javascript/features/core.io/io.js Sun Jul
24 07:49:15 2011
@@ -510,6 +510,10 @@ gadgets.io = function() {
* @member gadgets.io
*/
getProxyUrl: function(url, opt_params) {
+ var proxyUrl = config['proxyUrl'];
+ if (!proxyUrl) {
+ return proxyUrl;
+ }
var params = opt_params || {};
var refresh = params['REFRESH_INTERVAL'];
if (refresh === undefined) {
@@ -520,7 +524,7 @@ gadgets.io = function() {
var rewriteMimeParam =
params['rewriteMime'] ? '&rewriteMime=' +
encodeURIComponent(params['rewriteMime']) : '';
- var ret = config['proxyUrl'].replace('%url%', encodeURIComponent(url)).
+ var ret = proxyUrl.replace('%url%', encodeURIComponent(url)).
replace('%host%', document.location.host).
replace('%rawurl%', url).
replace('%refresh%', encodeURIComponent(refresh)).