Skip to content

Commit

Permalink
3.2.16
Browse files Browse the repository at this point in the history
  • Loading branch information
garywill committed Sep 9, 2023
1 parent cff2e65 commit a8b1352
Show file tree
Hide file tree
Showing 6 changed files with 42 additions and 4 deletions.
11 changes: 11 additions & 0 deletions src/i_scripts.js
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,17 @@ onrd.push(function(){
inputHandler.init_messageReceiver();
});

onrd.push(function(){
if (window.run_env != 'http_web') {
setTimeout(async function() {
var setting_autoSelectInputText = await get_addon_setting_local('autoSelectInputText') ;

if (setting_autoSelectInputText !== false)
inputHandler.getInputFieldEle().select();
}, 50);
}
});



onrd.push(function(){
Expand Down
8 changes: 8 additions & 0 deletions src/js/inputHandler.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,14 @@ function init_inputHandler() {
if (request['command'] == "setInputBoxToText" && typeof(request['text']) === "string" )
inputHandler.init_mode( request['text'] );
}

setTimeout(async function() {
var setting_autoSelectInputText = await get_addon_setting_local('autoSelectInputText') ;

if (setting_autoSelectInputText !== false)
inputHandler.getInputFieldEle().select();
}, 50);

});
};

Expand Down
2 changes: 1 addition & 1 deletion src/manifest-chrome.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"description": "__MSG_extensionDescription__",
"default_locale": "en",
"manifest_version": 2,
"version": "3.2.9",
"version": "3.2.16",
"homepage_url": "https://github.com/garywill/BigSearch",
"author": {
"name": "Garywill",
Expand Down
2 changes: 1 addition & 1 deletion src/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"description": "__MSG_extensionDescription__",
"default_locale": "en",
"manifest_version": 2,
"version": "3.2.9",
"version": "3.2.16",
"homepage_url": "https://garywill.github.io",
"developer": {
"name": "Garywill",
Expand Down
11 changes: 10 additions & 1 deletion src/options.html
Original file line number Diff line number Diff line change
Expand Up @@ -63,10 +63,19 @@ <h3 style="margin-bottom: 30px">
</li>
</ul>
</div>
<input type="checkbox" id="cbox_copyOnContextMenuOrKey">When context menu clicked (or keyword shortcut used), put selection text to clipboard also <span style="text-decoration: underline;">(need restart/reenable)</span></input>
<input type="checkbox" id="cbox_copyOnContextMenuOrKey">When context menu clicked (or keyboard shortcut used), put selection text to clipboard also <span style="text-decoration: underline;">(need restart/reenable)</span></input>
<br><br>
<hr>


<div>
<input type="checkbox" id="cbox_autoSelectInputText" checked="true">Auto select text in inputbox when UI open</input>
</div>
<br>
<hr>



<div id="div_shownew">
<br>
<input type="checkbox" id="cbox_shownew" >Show when new version available, at corner of addon page (need restart/reenable)</input>
Expand Down
12 changes: 11 additions & 1 deletion src/options.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,17 @@ async function on_optionpage_load() {
chrome.permissions.request( { permissions: ['clipboardWrite'] } , r=>console.log(r) );
});
} ) () ;

// --------------------------
(async () => {
var setting_autoSelectInputText = await get_addon_setting_local('autoSelectInputText') ;

if (setting_autoSelectInputText !== false)
document.getElementById("cbox_autoSelectInputText").checked = true;

document.getElementById("cbox_autoSelectInputText").addEventListener("change", function (event) {
chrome.storage.local.set({"autoSelectInputText" : event.target.checked});
});
} ) () ;
// --------------------------


Expand Down

0 comments on commit a8b1352

Please sign in to comment.