* WIN: Add CR to detection
Saving in Notepad++ with Windows line ending prevents script injection
Post fix for #1964 and some vague references at ce67c7a455
* Add some more line ending checks
* Windows ends in CR and OS Ⅸ compatible uses CR+LF ... OS Ⅹ/*nix uses LF
* Fix pre-existing bug with `\n' with string split for Windows ... tested only on Linux *(Qt 5.6.1)* with Unit Tests so far
Applies to #2027 and post followup for #1964
* Use default Left-associative for pipe (logical or)
* Specific first then general after e.g. flip them ... helps avoid a false injection match with a control character at the beginning with older editors *(may include OS2)*
Applies to #2027 and post followup for #1964
- Fixed parsing @updateURL/@downloadURL
- Updating is only manual
- User have to click on update button located in Greasemonkey settings
- Update works just like download
- New version is not being checked, original script is replaced
- Fixed coding style issues
Closes#1653
Somehow I was under false impression that QtWebEngineScript
takes care of the metadata parsing. It does not, so we must
run the script only on correct sites.
The HttpProxy setting neither makes sense nor works without a concrete
proxy being set. So default to something that has any chance of working
without manual configuration. If you need an HTTP proxy, you will have
to configure it anyway.
The function GM_listValues() got broken when the source file "values.js"
was minimized into "values.min.js" because the optimizing tool was not
aware that the string containing the placeholder (%1) is not final and
will be changed later. It optimized away the expression which gets the
length of the string and replaced it with its static value (2). This was
a problem because not the length of the placeholder (%1) but the length
of the current script id is needed to extract prefixes from the keys in
the local storage. Failing to correctly extract the prefixes prevented
finding the entries for the current script. This was fixed by comparing
prefixes without extracting new strings. It works around the need to get
the length of the id string and therefore the breaking optimization.
An unrelated and redundant variable declaration was also removed.
- Note: in `TabBar::setVisible()` we didn't need to
check `(visible && m_window->isFullScreen())` because tabbar's
visibility in fullscreen mode is managed by m_navigationContainer.