mirror of
https://invent.kde.org/network/falkon.git
synced 2024-11-11 01:22:10 +01:00
GreaseMonkey: Fix disabling scripts with Qt 5.8
Qt 5.8 parses the metadata block, so everything gets overwritten when QWebEngineScript::setSource is called. Closes #2206
This commit is contained in:
parent
fe0ae53653
commit
9011224c1a
|
@ -1,6 +1,6 @@
|
|||
/* ============================================================
|
||||
* GreaseMonkey plugin for QupZilla
|
||||
* Copyright (C) 2012-2016 David Rosca <nowrep@gmail.com>
|
||||
* Copyright (C) 2012-2017 David Rosca <nowrep@gmail.com>
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
@ -143,11 +143,11 @@ QWebEngineScript GM_Script::webScript() const
|
|||
}
|
||||
|
||||
QWebEngineScript script;
|
||||
script.setSourceCode(QSL("%1\n%2").arg(m_manager->bootstrapScript(), m_script));
|
||||
script.setName(fullName());
|
||||
script.setWorldId(QWebEngineScript::MainWorld);
|
||||
script.setInjectionPoint(injectionPoint);
|
||||
script.setRunsOnSubFrames(!m_noframes);
|
||||
script.setSourceCode(QSL("%1\n%2").arg(m_manager->bootstrapScript(), m_script));
|
||||
return script;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user