MCPcopy Create free account
hub / github.com/LeFroid/Viper-Browser / initNewTabScript

Method initNewTabScript

src/app/BrowserScripts.cpp:84–100  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

82}
83
84void BrowserScripts::initNewTabScript()
85{
86 QString newTabJS;
87 QFile newTabJSFile(QLatin1String(":/NewTabPage.js"));
88 if (newTabJSFile.open(QIODevice::ReadOnly))
89 newTabJS = newTabJSFile.readAll();
90 newTabJSFile.close();
91
92 QWebEngineScript newTabScript;
93 newTabScript.setInjectionPoint(QWebEngineScript::DocumentReady);
94 newTabScript.setName(QLatin1String("viper-new-tab-script"));
95 newTabScript.setRunsOnSubFrames(false);
96 newTabScript.setWorldId(QWebEngineScript::ApplicationWorld);
97 newTabScript.setSourceCode(newTabJS);
98
99 m_publicOnlyScripts.push_back(newTabScript);
100}
101
102void BrowserScripts::initAutoFillObserverScript()
103{

Callers

nothing calls this directly

Calls 1

setNameMethod · 0.80

Tested by

no test coverage detected