src/js/utils.js
branchpopcorn-port
changeset 575 8f483e430f51
parent 553 10d08f43c534
child 584 f90c88ab9a26
equal deleted inserted replaced
574:5770c64e2ec6 575:8f483e430f51
   132 IriSP.__guidCounter = 0;
   132 IriSP.__guidCounter = 0;
   133 IriSP.guid = function(prefix) {
   133 IriSP.guid = function(prefix) {
   134   IriSP.__guidCounter += 1;
   134   IriSP.__guidCounter += 1;
   135   return prefix + IriSP.__guidCounter;
   135   return prefix + IriSP.__guidCounter;
   136 };
   136 };
       
   137 
       
   138 /** returns an url to share on facebook */
       
   139 IriSP.mkFbUrl = function(url) {
       
   140   return "http://www.facebook.com/share.php?u=" + "I'm watching " + url;
       
   141 };
       
   142 
       
   143 /** returns an url to share on twitter */
       
   144 IriSP.mkTweetUrl = function(url) {
       
   145   return "http://twitter.com/home?status=" + "I'm sharing " + url;
       
   146 };
       
   147 
       
   148 /** returns an url to share on google + */
       
   149 IriSP.mkGplusUrl = function(url) {
       
   150   return "";
       
   151 };
       
   152 
   137 /* for ie compatibility
   153 /* for ie compatibility
   138 if (Object.prototype.__defineGetter__&&!Object.defineProperty) {
   154 if (Object.prototype.__defineGetter__&&!Object.defineProperty) {
   139    Object.defineProperty=function(obj,prop,desc) {
   155    Object.defineProperty=function(obj,prop,desc) {
   140       if ("get" in desc) obj.__defineGetter__(prop,desc.get);
   156       if ("get" in desc) obj.__defineGetter__(prop,desc.get);
   141       if ("set" in desc) obj.__defineSetter__(prop,desc.set);
   157       if ("set" in desc) obj.__defineSetter__(prop,desc.set);