| 230 | } |
| 231 | |
| 232 | void 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 | |
| 249 | bool GM_Manager::addScript(GM_Script* script) |
| 250 | { |
no test coverage detected