src/js/utils.js
branchpopcorn-port
changeset 686 f1dbe6a6e740
parent 650 54ad76d6f9fe
child 720 08b8b3ce30e4
equal deleted inserted replaced
685:973d9a495d11 686:f1dbe6a6e740
   163     return IriSP.config.shortener.shortening_function(url);
   163     return IriSP.config.shortener.shortening_function(url);
   164     
   164     
   165   return url;
   165   return url;
   166 };
   166 };
   167 
   167 
       
   168 /** Similar to substr but remove the last word if
       
   169     we're breaking a word in two.
       
   170  */ 
       
   171 IriSP.clean_substr = function(str, start, end) {
       
   172   var s = str.substr(start, end).substr(start, end).split(" ");
       
   173   s.pop();
       
   174   return s.join(" ");
       
   175 };
   168 /* for ie compatibility
   176 /* for ie compatibility
   169 if (Object.prototype.__defineGetter__&&!Object.defineProperty) {
   177 if (Object.prototype.__defineGetter__&&!Object.defineProperty) {
   170    Object.defineProperty=function(obj,prop,desc) {
   178    Object.defineProperty=function(obj,prop,desc) {
   171       if ("get" in desc) obj.__defineGetter__(prop,desc.get);
   179       if ("get" in desc) obj.__defineGetter__(prop,desc.get);
   172       if ("set" in desc) obj.__defineSetter__(prop,desc.set);
   180       if ("set" in desc) obj.__defineSetter__(prop,desc.set);