1
mirror of https://invent.kde.org/network/falkon.git synced 2024-11-11 01:22:10 +01:00

[GreaseMonkey] Fixed downloading scripts to correct directory

This commit is contained in:
David Rosca 2014-04-26 13:21:39 +02:00
parent 2bbde2a3a8
commit 445747155f
3 changed files with 5 additions and 3 deletions

View File

@ -60,7 +60,7 @@ void GM_Downloader::scriptDownloaded()
const QByteArray response = QString::fromUtf8(m_reply->readAll()).toUtf8();
if (response.contains(QByteArray("// ==UserScript=="))) {
const QString filePath = m_manager->scriptsDirectory() + QzTools::getFileNameFromUrl(m_reply->url());
const QString filePath = QString("%1/%2").arg(m_manager->scriptsDirectory(),QzTools::getFileNameFromUrl(m_reply->url()));
m_fileName = QzTools::ensureUniqueFilename(filePath);
QFile file(m_fileName);

View File

@ -41,7 +41,7 @@ PluginSpec GM_Plugin::pluginSpec()
spec.name = "GreaseMonkey";
spec.info = "Userscripts for QupZilla";
spec.description = "Provides support for userscripts (www.userscripts.org)";
spec.version = "0.4.4";
spec.version = "0.4.5";
spec.author = "David Rosca <nowrep@gmail.com>";
spec.icon = QPixmap(":gm/data/icon.png");
spec.hasSettings = true;

View File

@ -1,7 +1,9 @@
<RCC>
<qresource prefix="/gm">
<file>data/icon.png</file>
<file>data/bootstrap.min.js</file>
<file>data/icon.png</file>
<file>data/icon16.png</file>
<file>data/icon18.png</file>
<file>data/script.png</file>
<file>locale/ar_SA.qm</file>
<file>locale/bg_BG.qm</file>