deergon,
@deergon@lemmy.world avatar

I tried the python code out and it actually does work for me, ie. I’m able to update an existing bookmark.


<span style="color:#323232;"># hashing code from link inserted here
</span><span style="color:#323232;">def update_place(id, new_url):
</span><span style="color:#323232;">    new_url_hash = url_hash(new_url)
</span><span style="color:#323232;">    conn = sqlite3.connect('places.sqlite')
</span><span style="color:#323232;">    cur = conn.cursor()
</span><span style="color:#323232;">    cur.execute('UPDATE moz_places SET url = ?, url_hash = ? WHERE id = ?', (new_url, new_url_hash, id))
</span><span style="color:#323232;">    conn.commit()
</span><span style="color:#323232;">    cur.close()
</span><span style="color:#323232;">    conn.close()
</span><span style="color:#323232;">
</span><span style="color:#323232;">update_place(16299, "javascript:alert('Testing bookmarklet update ...');alert('Great success!');")
</span>

Only annoying thing is that Firefox needs to be closed while updating. Anyway, I haven’t tried with bigger scripts though, so there might be some gotchas there.

Agreed, keywords are really nice for keyboard navigation!

  • All
  • Subscribed
  • Moderated
  • Favorites
  • random
  • uselessserver093
  • Food
  • [email protected]
  • aaaaaaacccccccce
  • test
  • CafeMeta
  • testmag
  • MUD
  • RhythmGameZone
  • RSS
  • dabs
  • oklahoma
  • Socialism
  • SuperSentai
  • feritale
  • Testmaggi
  • KbinCafe
  • Ask_kbincafe
  • TheResearchGuardian
  • KamenRider
  • All magazines