| 136 | } |
| 137 | |
| 138 | void GM_Manager::loadScripts() |
| 139 | { |
| 140 | QWebEngineScriptCollection *collection = mApp->webProfile()->scripts(); |
| 141 | |
| 142 | for (const auto &gmScript : std::as_const(m_scripts)) { |
| 143 | if (!gmScript->isEnabled()) { |
| 144 | return; |
| 145 | } |
| 146 | |
| 147 | if (gmScript->startAt() != GM_Script::ContextMenu) { |
| 148 | collection->insert(gmScript->webScript()); |
| 149 | } |
| 150 | } |
| 151 | } |
| 152 | |
| 153 | void GM_Manager::unloadScripts() |
| 154 | { |
nothing calls this directly
no test coverage detected