diff --git a/Fauxbar/css/fauxbar.css b/Fauxbar/css/fauxbar.css index fc1bce7..1b63a5a 100755 --- a/Fauxbar/css/fauxbar.css +++ b/Fauxbar/css/fauxbar.css @@ -74,7 +74,7 @@ button { padding:3px 12px; } /* More Address Box results and Search Box suggestions/queries */ /* .arrowed is for hovered/highlighted/selected results */ -.result, .resultpreview { border-bottom:1px solid rgba(0,0,0,.11); padding: 4px 5px 5px 5px; display:block; } +.result, .resultpreview { border-bottom:1px solid rgba(0,0,0,.11); padding: 5px 5px 6px 7px; display:block; } .arrowed, .rightClickedResult { background-color:#3399ff; color:#fff; } .result_url, #options .result_url { padding-left:21px; white-space:nowrap; font-size:12px; overflow:hidden; display:inline-block; } .result_title, #options .result_title { font-size:14px; line-height:140%; white-space:nowrap; overflow:hidden; display:inline-block; } @@ -89,8 +89,8 @@ button { padding:3px 12px; } /* Highlight matching words within results. Added in 1.6.0. */ .highlight { background-color:#f8ffbf; border-radius:2px; } -/* Bookmark icon */ -.favstar { float:right; margin-top:2px; margin-right:-1px; } +/* Bookmark icon. fauxbar-1.js overrides margins: `var favstarMarginTop` and `var favstarMarginLeft` */ +.favstar { float:right; } /* "Truncated" dotting for Address Box result titles and URLs */ .dotdotdot { position:relative; float:right; } @@ -217,7 +217,7 @@ progress { width:100%; margin-top:6px; } input::-webkit-input-placeholder { color:rgba(0,0,0,.5); font-style:italic; } input:focus::-webkit-input-placeholder { color:transparent; } -.resultTag { padding:2px 5px 0 8px; text-decoration:none; } +.resultTag { padding:0px 4px 0 8px; text-decoration:none; } #addressbaricon { margin-top:1px; height:16px; width:16px; } diff --git a/Fauxbar/html/loadpaypal.html b/Fauxbar/html/loadpaypal.html deleted file mode 100755 index 391515f..0000000 --- a/Fauxbar/html/loadpaypal.html +++ /dev/null @@ -1,32 +0,0 @@ - - -Loading PayPal... - - - - -
-
-   - Loading... -
-
- - - - - - -
- - - » - - -
-
- - \ No newline at end of file diff --git a/Fauxbar/html/options.html b/Fauxbar/html/options.html index f84def5..148eabc 100755 --- a/Fauxbar/html/options.html +++ b/Fauxbar/html/options.html @@ -473,9 +473,9 @@

+ title="This is the equivalent of clicking Fauxbar's toolbar icon (located beside Chrome's Omnibox).">(?) - +
Activate the extension: (?) Not set
Ctrl+T
Open Fauxbar's Address Box in the current tab:Alt+D
Open Fauxbar's Address Box in a new tab:Ctrl+T
Open Fauxbar's Address Box in a new tab: Not set
Open Fauxbar's Search Box in the current tab:Ctrl+K
Open Fauxbar's Search Box in a new tab:Ctrl+Shift+K
@@ -916,7 +916,7 @@

Management

- Fauxbar version 1.8.0  (23 May, 2019) + Fauxbar version 1.8.1  (14 June 2019) diff --git a/Fauxbar/img/donate.gif b/Fauxbar/img/donate.gif deleted file mode 100755 index 43cef69..0000000 Binary files a/Fauxbar/img/donate.gif and /dev/null differ diff --git a/Fauxbar/img/icon-code.png b/Fauxbar/img/icon-code.png deleted file mode 100755 index 6223fe1..0000000 Binary files a/Fauxbar/img/icon-code.png and /dev/null differ diff --git a/Fauxbar/img/icon-facebook.png b/Fauxbar/img/icon-facebook.png deleted file mode 100755 index 6417d8c..0000000 Binary files a/Fauxbar/img/icon-facebook.png and /dev/null differ diff --git a/Fauxbar/img/icon-gplus.png b/Fauxbar/img/icon-gplus.png deleted file mode 100755 index 53ad6b9..0000000 Binary files a/Fauxbar/img/icon-gplus.png and /dev/null differ diff --git a/Fauxbar/img/icon-mail.png b/Fauxbar/img/icon-mail.png deleted file mode 100755 index ff7b305..0000000 Binary files a/Fauxbar/img/icon-mail.png and /dev/null differ diff --git a/Fauxbar/img/icon-paypal.png b/Fauxbar/img/icon-paypal.png deleted file mode 100755 index 0c33514..0000000 Binary files a/Fauxbar/img/icon-paypal.png and /dev/null differ diff --git a/Fauxbar/img/icon-reddit.png b/Fauxbar/img/icon-reddit.png deleted file mode 100755 index aaf5bf6..0000000 Binary files a/Fauxbar/img/icon-reddit.png and /dev/null differ diff --git a/Fauxbar/img/icon-twitter.png b/Fauxbar/img/icon-twitter.png deleted file mode 100755 index c52a4cb..0000000 Binary files a/Fauxbar/img/icon-twitter.png and /dev/null differ diff --git a/Fauxbar/img/paypal_logo.png b/Fauxbar/img/paypal_logo.png deleted file mode 100755 index 028d835..0000000 Binary files a/Fauxbar/img/paypal_logo.png and /dev/null differ diff --git a/Fauxbar/js/background-new.js b/Fauxbar/js/background-new.js index d1d5b34..8a3bda7 100755 --- a/Fauxbar/js/background-new.js +++ b/Fauxbar/js/background-new.js @@ -1087,22 +1087,19 @@ $(document).ready(function(){ } if (openDb()) { - window.db.transaction(function(tx){ tx.executeSql('ALTER TABLE opensearches ADD COLUMN encoding TEXT DEFAULT ""'); }); - window.db.transaction(function(tx){ tx.executeSql('VACUUM'); }); } - localStorage.currentVersion = "1.8.0"; + localStorage.currentVersion = chrome.runtime.getManifest().version; }); chrome.runtime.onInstalled.addListener(function(details){ - var currentVersion = "1.8.0"; - + var currentVersion = chrome.runtime.getManifest().version; switch (details.reason) { case 'install': @@ -1131,7 +1128,6 @@ chrome.runtime.onInstalled.addListener(function(details){ chrome.tabs.create({url:url, active:true}); }*/ - if (localStorage.justRetrievedFromCloud && localStorage.justRetrievedFromCloud == 1) { delete localStorage.justRetrievedFromCloud; chrome.tabs.create({url:chrome.runtime.getURL('/html/fauxbar.html#options=1')}); @@ -1198,6 +1194,12 @@ chrome.runtime.onInstalled.addListener(function(details){ } }*/ + // If updating to v1.8.1, force reindex in case database got wonky with Issue #48 + if (localStorage.indexedbefore == 1 && localStorage.completedMaintenanceForIssue48 != 1) { + localStorage.reindexForMaintenance = 1; + localStorage.indexComplete = 0; + } + // New options for v1.8.0 if (!localStorage.option_trimPastedText) { localStorage.option_trimPastedText = 1; @@ -1468,7 +1470,6 @@ chrome.runtime.onInstalled.addListener(function(details){ break; case 'chrome_update': - break; } }); @@ -2207,6 +2208,7 @@ function index() { var secs = parseFloat(date("U"))-parseFloat(startTime); window.reindexing = false; localStorage.indexComplete = 1; + localStorage.completedMaintenanceForIssue48 = 1; localStorage.issue47 = 0; localStorage.almostdone = 1; localStorage.needToReindex = 0; @@ -2286,61 +2288,4 @@ chrome.idle.onStateChanged.addListener(function(newState){ } break; } -});*/ - - -/* -chrome.notifications.create("updated", - { - type: 'list', - iconUrl: '/img/fauxbar128.png', - title: 'Fauxbar has been updated', - message: 'Yay!', - buttons: [ - { title: 'View full changelog' } - ], - items: [ - { title:'Title 1', message:'Message' }, - { title:'Title 2', message:'Message' }, - { title:'Title 3', message:'Message' } - ] - }, - function(){} -); -*/ - -// Options sync, added in v1.4.0 - -// Send local options to Google's server -/*function pushOptions () { - var localKeyNames = new Array(); - var keyName; - for (keyName in localStorage) { - if (substr(keyName, 0, 7) == 'option_' && keyName != 'option_bgimg') { - localKeyNames.push(keyName); - } - } - console.log('localKeyNames:',localKeyNames); - chrome.storage.sync.get(localKeyNames, function(items){ - console.log('existing items:', items); - var optionsToPush = {}; - for (var i in localKeyNames) { - keyName = localKeyNames[i]; - if (!items[keyName] || items[keyName] != localStorage[keyName]) { - optionsToPush[keyName] = localStorage[keyName]; - } - } - console.log('Wanting to push ' + Object.keys(optionsToPush).length + ' options to Google!'); - console.log('optionsToPush:', optionsToPush); - if (Object.keys(optionsToPush).length > 0) { - //console.log('Wanting to push ' + Object.keys(optionsToPush).length + ' options to Google!'); - chrome.storage.sync.set(optionsToPush, function(){ - if (chrome.runtime.lastError) { - console.warn('Failed to push options because: ' + chrome.runtime.lastError.message); - } else { - console.log('Options have been pushed successfully.'); - } - }); - } - }); -}*/ \ No newline at end of file +});*/ \ No newline at end of file diff --git a/Fauxbar/js/common.js b/Fauxbar/js/common.js index 3b0362d..415dc89 100755 --- a/Fauxbar/js/common.js +++ b/Fauxbar/js/common.js @@ -224,20 +224,18 @@ function urldecode (str) { // Initialize/create the database function openDb(force) { - // Hopefully prevent issue #47 from happening... don't try to load the database if the page isn't ready + // Don't load database if page isn't ready if (!$(document).ready()) { return false; } - if (!window.db) { - window.db = openDatabase('fauxbar', '1.0', 'Fauxbar data', 100 * 1024 * 1024); + var backgroundWindow = chrome.extension.getBackgroundPage(); + if (!backgroundWindow.db) { + backgroundWindow.db = openDatabase('fauxbar', '1.0', 'Fauxbar data', 100 * 1024 * 1024); } + window.db = backgroundWindow.db; if (window.db) { - if (localStorage.indexComplete == 1 || force == true) { - return true; - } else { - return false; - } + return localStorage.indexComplete == 1 || force == true; } else { alert("Fauxbar error: Unable to create or open Fauxbar's SQLite database."); diff --git a/Fauxbar/js/fauxbar-1.js b/Fauxbar/js/fauxbar-1.js index c483703..258088d 100755 --- a/Fauxbar/js/fauxbar-1.js +++ b/Fauxbar/js/fauxbar-1.js @@ -772,7 +772,6 @@ function showContextMenu(e) { if (usingSuperTriangle || $("#awesomeinput:focus").length) { $("#super_triangle .triangle").addClass("glow"); - // += ' '; html += ' '; html += ' '; } @@ -933,7 +932,7 @@ $("#contextMenu .menuOption").live("mousedown", function(){ case "Add Keyword...": $("#contextMenu").css("opacity",0); - var keyword = prompt('Add a keyword for '+$(window.rightClickedResult).attr("url")); + var keyword = prompt('Add a keyword for '+$(window.rightClickedResult).attr("url")+'\n\nTyping the keyword will ensure the result appears first when using the Address Box.'); if (keyword) { keyword = str_replace('"', '', keyword.trim()); if (keyword.length && openDb()) { @@ -1954,18 +1953,21 @@ if (localStorage.indexComplete != 1) { $("#apps").remove(); if (localStorage.reindexForMaintenance == 1) { $("#indexinginfo b").html(localStorage.extensionName+" needs to reindex for maintenance"); - $("#indexinginfo span#indexingInfo2").html(localStorage.extensionName+" needs to reindex your Chrome data to correct a bookmark-naming issue that was present in the previous version of "+localStorage.extensionName+"."); + $("#indexinginfo span#indexingInfo2").html(localStorage.extensionName+" needs to reindex Chrome's data to correct a database issue that was present in the previous version of "+localStorage.extensionName+"."); $("#currentstatus").html("Click Start Indexing to begin."); - } else if (localStorage.needToReindex && localStorage.needToReindex == 1) { + } + else if (localStorage.needToReindex && localStorage.needToReindex == 1) { $("#indexinginfo b").html(localStorage.extensionName+" needs to reindex your Chrome data"); $("#indexinginfo span#indexingInfo2").html(localStorage.extensionName+"'s database structure has been modified, so "+localStorage.extensionName+" needs to reindex your Chrome data. On the plus side, indexing is now approximately 70% faster than before."); $("#currentstatus").html("Click Start Indexing to begin."); - } else if (localStorage.indexedbefore == 1) { + } + else if (localStorage.indexedbefore == 1) { $("#indexinginfo b").html(localStorage.extensionName+" is reindexing"); $("#indexinginfo span#indexingInfo2").html(localStorage.extensionName+" is reindexing your history items and bookmarks."); $("#currentstatus").html("Reindexing..."); $("button").last().prop('disabled',true).html('Please Wait...').blur(); - } else if (localStorage.issue47 == 1) { + } + else if (localStorage.issue47 == 1) { $("#indexinginfo b").html(localStorage.extensionName+" is rebuilding"); $("#indexinginfo span#indexingInfo2").html(localStorage.extensionName+" is rebuilding its database, and reindexing your history items and bookmarks. Any custom keywords and search engines you had will also be restored shortly after."); $("#currentstatus").html("Rebuilding..."); @@ -3070,8 +3072,9 @@ function getResults(noQuery) { var scrollbarWidth = window.resultsAreScrollable ? getScrollBarWidth() : 0; - var favstarMarginTop = window.OS == "Mac" ? "-1px" : "2px"; - $("#results .favstar").attr("src", $("#fauxstar").attr("src")).css("margin-left",($("#results").innerWidth()-25-scrollbarWidth)+"px").css("margin-top",favstarMarginTop); + var favstarMarginTop = window.OS == "Mac" ? "-1px" : "0px"; + var favstarMarginLeft = ($("#results").innerWidth()-26-scrollbarWidth)+"px"; + $("#results .favstar").attr("src", $("#fauxstar").attr("src")).css("margin-top",favstarMarginTop).css("margin-left",favstarMarginLeft); $(".resultTag").each(function(){ $(this).css("left", $("#results").offset().left + $("#results").outerWidth() - $(this).outerWidth() - $(this).offset().left - ($(this).prev(".favstar").length*16) - scrollbarWidth); }); diff --git a/Fauxbar/manifest.json b/Fauxbar/manifest.json index f25f415..5551386 100755 --- a/Fauxbar/manifest.json +++ b/Fauxbar/manifest.json @@ -2,7 +2,6 @@ //// Comments in this file must be prefixed with "////" and must be removed when packaging for Chrome Web Store //// Remember to update: - //// background-new.js: var currentVersion = "1.x.x"; //// options.html: version 1.x.x and date //// When packaging Fauxbar Lite, change: @@ -18,7 +17,7 @@ "name": "Fauxbar", //// Rename for Fauxbar Lite - "version": "1.8.0", + "version": "1.8.1", "description": "An alternative to Chrome's Omnibox. Replaces the New Tab page.", //// Remove last sentence for Fauxbar Lite "minimum_chrome_version": "49",