You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@uima.apache.org by de...@apache.org on 2016/12/03 10:38:25 UTC

svn commit: r1772447 - /uima/uima-ducc/trunk/uima-ducc-web/src/main/webapp/root/js/ducc.js

Author: degenaro
Date: Sat Dec  3 10:38:25 2016
New Revision: 1772447

URL: http://svn.apache.org/viewvc?rev=1772447&view=rev
Log:
UIMA-5197 DUCC Web Server (WS) support startsWith function when not present in browser's js

Modified:
    uima/uima-ducc/trunk/uima-ducc-web/src/main/webapp/root/js/ducc.js

Modified: uima/uima-ducc/trunk/uima-ducc-web/src/main/webapp/root/js/ducc.js
URL: http://svn.apache.org/viewvc/uima/uima-ducc/trunk/uima-ducc-web/src/main/webapp/root/js/ducc.js?rev=1772447&r1=1772446&r2=1772447&view=diff
==============================================================================
--- uima/uima-ducc/trunk/uima-ducc-web/src/main/webapp/root/js/ducc.js (original)
+++ uima/uima-ducc/trunk/uima-ducc-web/src/main/webapp/root/js/ducc.js Sat Dec  3 10:38:25 2016
@@ -16,6 +16,18 @@
  * specific language governing permissions and limitations
  * under the License.
  */
+
+/*
+ * for Opera, which does not seem to have this js String function?
+ */
+if(!String.startsWith) {
+	String.prototype.startsWith = function startsWith(start) {
+		var index = start.length;
+		var subStr = this.substr(0, index);
+		return subStr === start;
+	};
+}
+
 /*!
  * ducc.js
  */