javascript - Implement unlimited frequency in rating-widget.com -


the rating-widget documentation writes unlimited user rating frequency of star rating system. i'm not sure how add main function code.

where can add line frequency=unlimited. should easy. i'm js rookie.

(function(d, t, e, m){     window.rw_async_init = function(){         rw.init({             huid: "336233",             uid: "2e7de74f3aeb426c10a2087ead09259c",             source: "website",             options: {                 "size": "medium",                 "style": "oxygen",                 "isdummy": false             }          });         rw.render();     };     // append rating-widget javascript library.     var rw, s = d.getelementsbytagname(e)[0], id = "rw-js",         l = d.location,          ck = "y" + t.getfullyear() + "m" + t.getmonth() + "d" + t.getdate(),         p = l.protocol,         f = ((l.search.indexof("dbg=") > -1) ? "" : ".min"),         = ("https:" == p ? "secure." + m + "js/" : "js." + m);     if (d.getelementbyid(id)) return;                   rw = d.createelement(e);     rw.id = id; rw.async = true;     rw.type = "text/javascript";     rw.src = p + "//" + + "external" + f + ".js?ck=" + ck;     s.parentnode.insertbefore(rw, s); }(document, new date(), "script", "rating-widget.com/")); 

in options object section describes options can specify, includes frequency, specify key/value:

frequency: rw.frequency.unlimited 

you specify in init call, in options object, this:

rw.init({     huid: "336233",     uid: "2e7de74f3aeb426c10a2087ead09259c",     source: "website",     options: {         frequency: rw.frequency.unlimited, // <-- added         "size": "medium",         "style": "oxygen",         "isdummy": false     }  }); 

nb: documentation not complete, above syntax not covered in rw methods section, init call said need uid first argument. evidently 1 of ways call init, page used grab code passes nested object first (and only) argument.

also, seems more inline main documentation use predefined enumerations setting options. set size rw.size.small instead of "small".


Comments

Popular posts from this blog

asynchronous - C# WinSCP .NET assembly: How to upload multiple files asynchronously -

aws api gateway - SerializationException in posting new Records via Dynamodb Proxy Service in API -

asp.net - Problems sending emails from forum -