From mehdi, 11 Months ago, written in Plain Text.
This paste will go to meet its maker in 1 Second.
Embed
  1. I've put exactly that:
  2. SELECT_FIRST_INPUT = 'jseval -q var inputs = document.getElementsByTagName("input"); for(var i = 0; i < inputs.length; i++) { var hidden = false; for(var j = 0; j < inputs[i].attributes.length; j++) { hidden = hidden || inputs[i].attributes[j].value.includes("hidden"); }; if(!hidden) { inputs[i].focus(); break; } }'
  3. config.bind('gi', SELECT_FIRST_INPUT)
  4. - edited on libreoffice but on brut text format -
  5.  
  6. which gives:
  7. 18:54:15 ERROR: Error while loading
  8. Traceback (most recent call last):
  9.   File "/usr/lib/python3/dist-packages/qutebrowser/config/", line 387, in read_config_py
  10.     code = compile(source, filename, 'exec')
  11.   File "/home/mehdi/.config/qutebrowser/", line 1
  12.     config.bind('gi', SELECT_FIRST_INPUT)SELECT_FIRST_INPUT = 'jseval -q var inputs =
  13.                                                           ^
  14. SyntaxError: invalid syntax
  15.  
  16. During handling of the above exception, another exception occurred:
  17.  
  18. Traceback (most recent call last):
  19.   File "/usr/lib/python3/dist-packages/qutebrowser/config/", line 59, in early_init
  20.     _config_py(config_file)
  21.   File "/usr/lib/python3/dist-packages/qutebrowser/config/", line 395, in read_config_py
  22.     raise configexc.ConfigFileErrors(basename, [desc])
  23. qutebrowser.config.configexc.ConfigFileErrors: Errors occurred while reading :
  24.   Syntax Error: invalid syntax (, line 1)
  25. 18:54:16 INFO: Opening in existing instance
  26. =>                                                                        
  27.  
  28. opens, but does feel like the shortcut works.
  29.