SmartProxy icon indicating copy to clipboard operation
SmartProxy copied to clipboard

In Chrome keyboard shortcut for switching proxies should cycle

Open wusumu opened this issue 2 years ago • 8 comments

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

wusumu avatar Feb 15 '23 18:02 wusumu

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

wusumu avatar Feb 15 '23 18:02 wusumu

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 avatar Feb 15 '23 21:02 salarcode

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 avatar Feb 15 '23 21:02 salarcode

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~~~

Nokic233 avatar Mar 12 '24 09:03 Nokic233

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 avatar Mar 13 '24 11:03 salarcode

Related: #363

salarcode avatar Mar 13 '24 11:03 salarcode

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~

Nokic233 avatar Mar 22 '24 09:03 Nokic233

This ticket is for enhancing the proxy cycle shortcuts behaviour, for action click events behaviour see https://github.com/salarcode/SmartProxy/issues/363

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

salarcode avatar Mar 23 '24 13:03 salarcode

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

salarcode avatar Jul 17 '24 13:07 salarcode