Author Topic: Greasemonkey  (Read 2836 times)

Tom

  • BM Dev Team
  • Exalted Emperor
  • *
  • Posts: 8228
    • View Profile
    • BattleMaster
Greasemonkey
« Topic Start: July 12, 2011, 01:06:18 PM »
Anyone familiar with Greasemonkey?

I have an idea for a script, but don't know if that's possible.

I would like it to add a user-editable field to a profile page, and store whatever I put there and retrieve it when I visit the site again. Something like the Internote extension, except that I want it embedded in the page.

Possible?

De-Legro

  • Honourable King
  • *****
  • Posts: 3838
    • View Profile
Re: Greasemonkey
« Reply #1: July 13, 2011, 05:14:29 AM »
Its been a while since I used Greasemonkey. If I understand you correctly you want to allow people to make "notes" on profile pages, but store the texton the individuals computer rather then in the database? Last time I used Greasemonkey there was no supported way to have local storage. There were some ways around this, like running a separate server to store stuff, or attempting to access some of the browser specific local storage so that was always a hassle to support.

It looks like you might be able to use the new HTML LocalStorage cookie type thing, but I've not tried it.
Previously of the De-Legro Family
Now of representation unknown.

Tom

  • BM Dev Team
  • Exalted Emperor
  • *
  • Posts: 8228
    • View Profile
    • BattleMaster
Re: Greasemonkey
« Reply #2: July 13, 2011, 08:42:15 PM »
Yeah, I was afraid the storage part would be the problem.

Anyone know of some other Firefox extension that could do this kind of trick?


Nosferatus

  • Testers
  • Mighty Duke
  • *
  • Posts: 1093
  • Too weird to live, too rare to die
    • View Profile
Re: Greasemonkey
« Reply #3: July 13, 2011, 08:46:16 PM »
Don't know much about all this but, i've found this article: http://alternativeto.net/software/greasemonkey/
Ubiquity sounds good.
I am not sure if it suits your wishes.
Formerly playing the Nosferatus and Bhrantan Family.
Currently playing the Polytus Family in: Gotland, Madina, Astrum, Outer Tilog

De-Legro

  • Honourable King
  • *****
  • Posts: 3838
    • View Profile
Re: Greasemonkey
« Reply #4: July 14, 2011, 02:20:06 AM »
If you only want it to run on Firefox, it is reasonably trival it has a Greasemonkey API with getValue() and setValue() which saves string data in the preferences.js file. If the script is for your personal use that would probably work fine, so long as you don't want to store massive amounts of data which would result in Firefox running slow for everything. If you need cross browser support, then Web Storage which was part of the HTML5 spec but now has its own separate spec should work for the majority of modern browsers.

With Firefox the other option is to simply write your own extension to do the job, then you have easy access to SQL lite solutions.
Previously of the De-Legro Family
Now of representation unknown.