summaryrefslogtreecommitdiff
path: root/src/core/user_script.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/user_script.cpp')
-rw-r--r--src/core/user_script.cpp16
1 files changed, 15 insertions, 1 deletions
diff --git a/src/core/user_script.cpp b/src/core/user_script.cpp
index 912b204b7..6f5828cbf 100644
--- a/src/core/user_script.cpp
+++ b/src/core/user_script.cpp
@@ -81,6 +81,7 @@ UserScript::UserScript(const UserScript &other)
return;
scriptData.reset(new UserScriptData(*other.scriptData));
m_name = other.m_name;
+ m_url = other.m_url;
}
UserScript::~UserScript()
@@ -96,6 +97,7 @@ UserScript &UserScript::operator=(const UserScript &other)
}
scriptData.reset(new UserScriptData(*other.scriptData));
m_name = other.m_name;
+ m_url = other.m_url;
return *this;
}
@@ -125,6 +127,16 @@ void UserScript::setSourceCode(const QString &source)
parseMetadataHeader();
}
+QUrl UserScript::sourceUrl() const
+{
+ return m_url;
+}
+
+void UserScript::setSourceUrl(const QUrl &url)
+{
+ m_url = url;
+}
+
UserScript::InjectionPoint UserScript::injectionPoint() const
{
if (isNull())
@@ -173,7 +185,9 @@ bool UserScript::operator==(const UserScript &other) const
return worldId() == other.worldId()
&& runsOnSubFrames() == other.runsOnSubFrames()
&& injectionPoint() == other.injectionPoint()
- && name() == other.name() && sourceCode() == other.sourceCode();
+ && name() == other.name()
+ && sourceCode() == other.sourceCode()
+ && sourceUrl() == other.sourceUrl();
}
void UserScript::initData()