Author Topic: Prefixr wrapper  (Read 2429 times)

Offline Anonymous

  • Anonymous
  • Jr. Member
  • **
  • Posts: 77
  • Karma: +0/-0
    • View Profile
Prefixr wrapper
« on: October 15, 2012, 11:15:24 am »
Prefixr plugin exists in Sublime Text 2. You can create same, see wrapper https://sourceforge.net/projects/prefixr-cli/

Offline alex

  • Developer
  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2181
  • Karma: +37/-3
    • View Profile
    • HippoEDIT
Re: Prefixr wrapper
« Reply #1 on: October 15, 2012, 02:23:39 pm »
Hi Alex,

good idea for scripting plug-in, will add it soon.
Small effort -> big benefits :) .

Thanks.

BR, Alex.

Offline alex

  • Developer
  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2181
  • Karma: +37/-3
    • View Profile
    • HippoEDIT
Re: Prefixr wrapper
« Reply #2 on: October 15, 2012, 05:47:39 pm »
Done. See attached plugin file.

But I have strange filling that I did too much, and all that options that exist on main page not supported by API. As:

Code: Javascript
  1.         if (readStorage("compress_option", false)) url += "compress_option=on&";
  2.         if (readStorage("add_spaces_option", true)) url += "add_spaces_option=on&";
  3.         if (readStorage("keep_vars_option", false)) url += "keep_vars_option=on&";
  4.         if (readStorage("all_exclude", false)) url += "all_exclude=on&";
  5.         if (readStorage("o_exclude", false)) url += "o_exclude=on&";
  6.         if (readStorage("ms_exclude", false)) url += "ms_exclude=on&";
  7.         if (readStorage("moz_exclude", false)) url += "moz_exclude=on&";
  8.  
  9.         return url + 'css=' + escape(textToFormat);
  10.  

Or maybe I miss something? I have not also found any official docu except of example implementations...
Got it.

« Last Edit: October 15, 2012, 08:53:09 pm by alex »

Offline Anonymous

  • Anonymous
  • Jr. Member
  • **
  • Posts: 77
  • Karma: +0/-0
    • View Profile
Re: Prefixr wrapper
« Reply #3 on: October 16, 2012, 03:30:37 pm »
I not sure you use options supported by API. Your hejs is big, very.

Offline alex

  • Developer
  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2181
  • Karma: +37/-3
    • View Profile
    • HippoEDIT
Re: Prefixr wrapper
« Reply #4 on: October 16, 2012, 04:04:52 pm »
These are options available in HTML version. I have done some adoptions, and now as I see looks like they are accepted, at least some of them :)
Most of the script is definition/management of option page for plugin and icon. The coding itself is several lines -> just do request to web service and replace the text.