Welcome Guest.   Make a donation to an author on the site August 02, 2014, 03:38:40 AM  *

Please login or register.
Or did you miss your validation email?


Login with username and password (forgot your password?)
Why not become a lifetime supporting member of the site with a one-time donation of any amount? Your donation entitles you to a ton of additional benefits, including access to exclusive discounts and downloads, the ability to enter monthly free software drawings, and a single non-expiring license key for all of our programs.


You must sign up here before you can post and access some areas of the site. Registration is totally free and confidential.
 
Learn about the DonationCoder.com microdonation system (DonationCredits).
   
   Forum Home   Thread Marks Chat! Downloads Search Login Register  
Pages: [1]   Go Down
  Reply  |  New Topic  |  Print  
Author Topic: Firefox Extension Coding - Stop Those Livemarks  (Read 3201 times)
Ehtyar
Supporting Member
**
Posts: 1,236



That News Guy

see users location on a map View Profile Read user's biography. Give some DonationCredits to this forum member
« on: June 19, 2008, 05:38:17 PM »

Hi all.
I've just upgraded to Firefox 3, and as one might expect I'm pretty wrapped. The transition from 2 to 3 however (I use the portable version and thus had to manually reload Firefox), something came to my attention that i was not aware of prior to the transition. I have quite a few 'livemarks' (firefox rss subscriptions) and I've noticed how often they actually update. I'll be lucky if i get around to checking my feeds once a week, though apparently they update every 15 minutes. Unfortunately Firefox provides no mechanism to prevent this process from ocurring. You can lengthen/shorten the delay between updates via the hidden preference 'browser.bookmarks.livemark_refresh_seconds', but it cannot be disable entirely. I've found Reliby which I can use to manually update the feeds when I'd like to peruse them.
I believe i have found the location where this process is initiated: line 917 in browser.js
[copy or print]
  setTimeout(function() PlacesUtils.livemarks.start(), 5000);
for those familiar with Firefox's guts, though I've been unable to find the location of this function (it does not appear to be in utils.js as one might expect). Unfortunately, were i to simply delete this line, i would be forced to continue doing so each time the browser was updated. I am hoping someone here is familiar enough with Firefox's inner workings to perhaps attempt creation of an addon to prevent the automatic feed updating process. I have read a handful of documents on the subject, prior to which i considered myself a coder, but now i'm not so certain  Cry.
Anyway, if anyone were able to get me any closer to accomplishing my goal, i would very much appreciate it.

Thanks, Ehtyar.
Logged
Lashiec
Member
**
Posts: 2,374


see users location on a map View Profile Give some DonationCredits to this forum member
« Reply #1 on: June 19, 2008, 05:46:27 PM »

Did you try setting it up to 0, -1 or an obscenely high number?
« Last Edit: June 19, 2008, 05:57:11 PM by Lashiec » Logged
Ehtyar
Supporting Member
**
Posts: 1,236



That News Guy

see users location on a map View Profile Read user's biography. Give some DonationCredits to this forum member
« Reply #2 on: June 19, 2008, 05:56:08 PM »

Did you try setting it up to "-1" or an obscenely high number?
Hey lash man smiley Unfortunately that won't stop the initial update when the browser is first started, and I've read on the mozilla forum (can't find the link for the life of me) that neither approach works; apparently setting the number to an invalid value (-1, 0 etc) or setting it too high (>6 hours if memory serves) causes Firefox to use the default value (15 minutes). Thanks for the suggestion though.

Ehtyar.
Logged
yotta
Supporting Member
**
Posts: 50


View Profile Give some DonationCredits to this forum member
« Reply #3 on: June 20, 2008, 10:21:00 AM »

why does it bother you that it updates?
Logged
Ehtyar
Supporting Member
**
Posts: 1,236



That News Guy

see users location on a map View Profile Read user's biography. Give some DonationCredits to this forum member
« Reply #4 on: June 20, 2008, 03:57:23 PM »

why does it bother you that it updates?
Just because it's so excessive really. I have about 20 feeds, and look at them once a week, yet they're being updated on average about every two hours (I've been testing with Live HTTP Headers). I've been making some progress on my own, however. The code shown above:
[copy or print]
setTimeout(function() PlacesUtils.livemarks.start(), 5000);
executes the function LS_start() found in components\nsLivemarkService.js:
[copy or print]
  --Line 509--
  _updateTimer: null,
  start: function LS_start() {
    if (this._updateTimer)
      return;
    // start is called in delayed startup, 5s after browser startup
    // we do a first check of the livemarks here, next checks will be on timer
    // browser start => 5s => this.start() => check => refresh_time => check
    this._checkAllLivemarks();
    // the refresh time is calculated from the expiration time, but with a cap
    var refresh_time = Math.min(Math.floor(gExpiration / 4), MAX_REFRESH_TIME);
    this._updateTimer = new G_Alarm(BindToObject(this._checkAllLivemarks, this),
                                    refresh_time, true /* repeat */);
  },
Basically all that needs to be done is to empty this function, and I'm all done. I'm working on that step now.

Ehtyar.
Logged
Pages: [1]   Go Up
  Reply  |  New Topic  |  Print  
 
Jump to:  
   Forum Home   Thread Marks Chat! Downloads Search Login Register  

DonationCoder.com | About Us
DonationCoder.com Forum | Powered by SMF
[ Page time: 0.028s | Server load: 0.08 ]