MCPcopy Create free account
hub / github.com/KDE/falkon / disableScript

Method disableScript

src/plugins/GreaseMonkey/gm_manager.cpp:232–247  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

230}
231
232void GM_Manager::disableScript(GM_Script* script)
233{
234 script->setEnabled(false);
235 m_disabledScripts.append(script->fullName());
236
237 if (script->startAt() == GM_Script::ContextMenu) {
238 m_contextMenuScripts.removeOne(script);
239 }
240 else {
241 QWebEngineScriptCollection *collection = mApp->webProfile()->scripts();
242 const auto scripts = collection->find(script->fullName());
243 for (const auto &script : scripts) {
244 collection->remove(script);
245 }
246 }
247}
248
249bool GM_Manager::addScript(GM_Script* script)
250{

Callers 1

itemChangedMethod · 0.80

Calls 6

fullNameMethod · 0.80
startAtMethod · 0.80
webProfileMethod · 0.80
findMethod · 0.80
setEnabledMethod · 0.45
removeMethod · 0.45

Tested by

no test coverage detected