Skip to content

Commit d62a141

Browse files
committed
missing JSUtilI method
1 parent 07341a4 commit d62a141

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

sources/net.sf.j2s.java.core/srcjs/js/j2sApplet.js

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -816,6 +816,17 @@ if (database == "_" && J2S._serverUrl.indexOf("//your.server.here/") >= 0) {
816816
".bin?", ".smol?", ".spartan?", ".mrc?", ".pse?", ".map?",
817817
".omap?", ".dcd?", ".mp3?", ".ogg?", ".wav?", ".au?" ];
818818

819+
J2S.addBinaryFileType = function(ext) {
820+
if (!ext.indexOf(".") == 0)
821+
ext = "." + ext;
822+
if (!ext.indexOf("?") == ext.length - 1)
823+
ext += "?";
824+
for (var i = J2S._binaryTypes.length; --i >= 0;)
825+
if (J2S._binaryTypes[i] == ext)
826+
return;
827+
J2S._binaryTypes.push(ext);
828+
}
829+
819830
J2S.isBinaryUrl = function(url) {
820831
url = url.toLowerCase() + "?";
821832
for (var i = J2S._binaryTypes.length; --i >= 0;)

0 commit comments

Comments
 (0)