Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

In Chrome keyboard shortcut for switching proxies should cycle #264

Closed
wusumu opened this issue Feb 15, 2023 · 9 comments
Closed

In Chrome keyboard shortcut for switching proxies should cycle #264

wusumu opened this issue Feb 15, 2023 · 9 comments
Labels
type-enhancement Enhancement to existing feature

Comments

@wusumu
Copy link

wusumu commented Feb 15, 2023

There is already a Switch to the next proxy server as the active proxy
but can't switch back

@wusumu
Copy link
Author

wusumu commented Feb 15, 2023

or press again to cycle back to the first is the best

@salarcode
Copy link
Owner

salarcode commented Feb 15, 2023

Please follow issue formats:
https://github.com/salarcode/SmartProxy/issues/new/choose

You have not mentioned your browser! But I can guess you are talking about Chrome

@salarcode
Copy link
Owner

There is a limitation on number of shortcuts on google chrome. Can't do anything about it.

But pressing again to cycle back is a good idea.

@salarcode salarcode changed the title Hotkey to Switch to the previous proxy server as the active proxy In Chrome keyboard shortcut for switching proxies should cycle Feb 15, 2023
@salarcode salarcode added the type-enhancement Enhancement to existing feature label Feb 15, 2023
@Nokic233
Copy link

There is a limitation on number of shortcuts on google chrome. Can't do anything about it.谷歌浏览器上的快捷方式数量有限制。对此无能为力。

But pressing again to cycle back is a good idea.但再次按下循环返回是个好主意。

chrome_IQMSSxXG8V

I have an idea. Since there may be conflicts with shortcut keys, is it a better implementation to click on the image to cycle and switch? I'm not sure about the technical details here, it's just a simple idea~~~

@salarcode
Copy link
Owner

I have an idea. Since there may be conflicts with shortcut keys, is it a better implementation to click on the image to cycle and switch? I'm not sure about the technical details here, it's just a simple idea~~~

Click on icon opens the menu, can't do that

@salarcode
Copy link
Owner

Related: #363

@Nokic233
Copy link

I have an idea. Since there may be conflicts with shortcut keys, is it a better implementation to click on the image to cycle and switch? I'm not sure about the technical details here, it's just a simple idea~~~

Click on icon opens the menu, can't do that

Yes, You're right. But if you delete default_popup from manifest.json, Adding some code to background.js should be able to implement it.

chrome.action.onClicked.addListener((tab) => {
  // someCondition need to add a new setting
  if (someCondition) {
    chrome.action.setPopup({ tabId: tab.id, popup: 'popup.html' });
  } else {
    // Quick click switch
  }
});

Then add a check option in the right-click icon menu, This way, you can cancel the quick switch settings

chrome.contextMenus.create({
      title: XXX,
      contexts: 'action',
      id: XXX,
      type:'checkbox',
      checked:true
    });

such as:
image

I have tried to look at the project code, but unfortunately, I have not developed a browser plugin. I searched for this information from Google and hope it can be helpful~

@salarcode
Copy link
Owner

This ticket is for enhancing the proxy cycle shortcuts behaviour, for action click events behaviour see #363

Also the problem is that I don't have much free time

@salarcode
Copy link
Owner

Shortcuts now will cycle at the end of the list. This is effective for both select next & select previous proxies.
This will be out with the next release

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type-enhancement Enhancement to existing feature
Projects
None yet
Development

No branches or pull requests

3 participants