Changeset 6983


Ignore:
Timestamp:
Mar 9, 2018, 10:40:53 AM (18 months ago)
Author:
Juanma
Message:

Fix firefox first launch

Location:
lliurex-on-fire/trunk/fuentes/lliurex-on-fire
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • lliurex-on-fire/trunk/fuentes/lliurex-on-fire/lliurex_on_fire.js

    r6891 r6983  
    1212function actionLog(e)
    1313{
    14         console.log(e);
     14        console.log("Lliurex-on-fire: "+e);
    1515}
    1616
     
    4848{
    4949        var bookmark_bar_id=0;
     50        var bookmark_title='';
    5051        chrome.bookmarks.getTree(function(tree){
    5152                bookmark_bar_id=tree[0].children[0].id;
     53                bookmark_title=tree[0].children[0].title;
    5254                if (bookmark_bar_id==0)
    5355                {
    5456                        bookmark_bar_id='toolbar_____';
    5557                }
     58                query={'title':""+bookmark_title};
     59                chrome.bookmarks.search(query,wait_for_bm);
    5660                query={'title':title,'parentId':""+bookmark_bar_id};
    5761                bm_folder=chrome.bookmarks.create(query,function(newFolder){checkBookmarks(newFolder)});
     
    5963}
    6064
     65function sleep(ms)
     66{
     67        return new Promise(resolve=>setTimeout(resolve,ms));
     68}
     69
     70async function wait_for_bm(bm_folder)
     71{
     72        if (! bm_folder[0])
     73        {
     74                await sleep(100);
     75                chrome.bookmarks.search(query,wait_for_bm);
     76        }
     77}
    6178
    6279function processBookmarks(bm_folder)
  • lliurex-on-fire/trunk/fuentes/lliurex-on-fire/manifest.json

    r6891 r6983  
    33  "manifest_version": 2,
    44  "name": "LliurexOnFire",
    5   "version": "0.1.0.1",
     5  "version": "0.1.0.2",
    66
    77  "description": "Add custom settings for LliureX",
Note: See TracChangeset for help on using the changeset viewer.