For a mouseless future.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

bridge.js 600B

12345678910111213141516171819202122232425262728293031323334
  1. var bridge = {
  2. onConf: function(cb) {
  3. self.port.on("conf", function(c) {
  4. cb(c);
  5. });
  6. },
  7. onKeys: function(cb) {
  8. self.port.on("keys", function(k) {
  9. cb(k);
  10. });
  11. },
  12. changeTabLeft: function() {
  13. self.port.emit("change_tab_left");
  14. },
  15. changeTabRight: function() {
  16. self.port.emit("change_tab_right");
  17. },
  18. moveTabLeft: function() {
  19. self.port.emit("move_tab_left");
  20. },
  21. moveTabRight: function() {
  22. self.port.emit("move_tab_right");
  23. },
  24. openTab: function(href) {
  25. self.port.emit("tab_open", href);
  26. },
  27. setClipboard: function(txt) {
  28. self.port.emit("clipboard_set", txt);
  29. }
  30. }