src/js/utils.js
branchpopcorn-port
changeset 836 526f91f5253e
parent 835 a8af9da7c622
child 837 353a78021ebc
equal deleted inserted replaced
835:a8af9da7c622 836:526f91f5253e
   182     return IriSP.config.shortener.shortening_function(url);
   182     return IriSP.config.shortener.shortening_function(url);
   183     
   183     
   184   return url;
   184   return url;
   185 };
   185 };
   186 
   186 
   187 /** Similar to substr but remove the last word if
   187 
   188     we're breaking a word in two.
       
   189  */ 
       
   190 IriSP.clean_substr = function(str, start, end) {
       
   191   var s = str.substr(start, end).substr(start, end).split(" ");
       
   192   s.pop();
       
   193   return s.join(" ");
       
   194 };
       
   195 /* for ie compatibility
   188 /* for ie compatibility
   196 if (Object.prototype.__defineGetter__&&!Object.defineProperty) {
   189 if (Object.prototype.__defineGetter__&&!Object.defineProperty) {
   197    Object.defineProperty=function(obj,prop,desc) {
   190    Object.defineProperty=function(obj,prop,desc) {
   198       if ("get" in desc) obj.__defineGetter__(prop,desc.get);
   191       if ("get" in desc) obj.__defineGetter__(prop,desc.get);
   199       if ("set" in desc) obj.__defineSetter__(prop,desc.set);
   192       if ("set" in desc) obj.__defineSetter__(prop,desc.set);