~michael-sheldon/webbrowser-app/implement-download-folder

« back to all changes in this revision

Viewing changes to src/app/webbrowser/BookmarksModelUtils.js

  • Committer: Michael Sheldon
  • Date: 2015-10-26 11:09:25 UTC
  • mfrom: (1106.59.20 webbrowser-app)
  • Revision ID: michael.sheldon@canonical.com-20151026110925-2j9uswxlr5ipon7y
MergeĀ fromĀ trunk

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 * Copyright 2015 Canonical Ltd.
 
3
 *
 
4
 * This file is part of webbrowser-app.
 
5
 *
 
6
 * webbrowser-app is free software; you can redistribute it and/or modify
 
7
 * it under the terms of the GNU General Public License as published by
 
8
 * the Free Software Foundation; version 3.
 
9
 *
 
10
 * webbrowser-app is distributed in the hope that it will be useful,
 
11
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 
12
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
13
 * GNU General Public License for more details.
 
14
 *
 
15
 * You should have received a copy of the GNU General Public License
 
16
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
17
 */
 
18
 
 
19
/* Prepend the homepage bookmark item to bookmarks model */
 
20
function prependHomepageToBookmarks(model, homeEntry) {
 
21
    var items = []
 
22
    items.push(homeEntry)
 
23
    for (var i = 0; i < model.count; i++) {
 
24
        items.push(model.get(i))
 
25
    }
 
26
    return items
 
27
}