Return-Path: X-Original-To: apmail-shindig-commits-archive@www.apache.org Delivered-To: apmail-shindig-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id C63CD733F for ; Sun, 24 Jul 2011 07:50:07 +0000 (UTC) Received: (qmail 7949 invoked by uid 500); 24 Jul 2011 07:50:06 -0000 Delivered-To: apmail-shindig-commits-archive@shindig.apache.org Received: (qmail 7728 invoked by uid 500); 24 Jul 2011 07:49:45 -0000 Mailing-List: contact commits-help@shindig.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@shindig.apache.org Delivered-To: mailing list commits@shindig.apache.org Received: (qmail 7714 invoked by uid 99); 24 Jul 2011 07:49:40 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 24 Jul 2011 07:49:40 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 24 Jul 2011 07:49:37 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id B899B2388906; Sun, 24 Jul 2011 07:49:16 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1150289 - /shindig/trunk/features/src/main/javascript/features/core.io/io.js Date: Sun, 24 Jul 2011 07:49:16 -0000 To: commits@shindig.apache.org From: lindner@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20110724074916.B899B2388906@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org 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)).