mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 693891 - Make "Add to Home Screen" use the Bookmark title instead of the page title, to allow you to name the shortcut whatever you want. r=mfinkle
This commit is contained in:
parent
e35ed10ff2
commit
678539f8ff
@ -47,6 +47,13 @@ var BookmarkPopup = {
|
||||
this.hide();
|
||||
|
||||
let browser = getBrowser();
|
||||
Util.createShortcut(browser.contentTitle, browser.currentURI.spec, browser.mIconURL, "bookmark");
|
||||
let itemId = PlacesUtils.getMostRecentBookmarkForURI(browser.currentURI);
|
||||
let title = "";
|
||||
if (itemId == -1)
|
||||
title = browser.contentTitle;
|
||||
else
|
||||
title = PlacesUtils.bookmarks.getItemTitle(itemId);
|
||||
|
||||
Util.createShortcut(title, browser.currentURI.spec, browser.mIconURL, "bookmark");
|
||||
}
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user