Changeset 251921 in webkit
- Timestamp:
- Nov 1, 2019 9:08:33 AM (4 years ago)
- Location:
- trunk/Source/WebInspectorUI
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebInspectorUI/ChangeLog
r251919 r251921 1 2019-11-01 Devin Rousso <drousso@apple.com> 2 3 Web Inspector: make the default content of the Inspector Bootstrap Script a comment that explains how it works 4 https://bugs.webkit.org/show_bug.cgi?id=203704 5 6 Reviewed by Timothy Hatcher. 7 8 * UserInterface/Controllers/NetworkManager.js: 9 (WI.NetworkManager.prototype.async createBootstrapScript): 10 11 * Localizations/en.lproj/localizedStrings.js: 12 1 13 2019-11-01 Devin Rousso <drousso@apple.com> 2 14 -
trunk/Source/WebInspectorUI/Localizations/en.lproj/localizedStrings.js
r251871 r251921 635 635 localizedStrings["Invisible characters"] = "Invisible characters"; 636 636 localizedStrings["Invoke getter"] = "Invoke getter"; 637 localizedStrings["It is evaluated immediately after the global object is created, before any other content has loaded."] = "It is evaluated immediately after the global object is created, before any other content has loaded."; 637 638 localizedStrings["JP2"] = "JP2"; 638 639 localizedStrings["JPEG"] = "JPEG"; … … 715 716 localizedStrings["Missing result level"] = "Missing result level"; 716 717 localizedStrings["Mixed"] = "Mixed"; 718 localizedStrings["Modifications made here will take effect on the next load of any page or sub-frame."] = "Modifications made here will take effect on the next load of any page or sub-frame."; 717 719 localizedStrings["Module Code"] = "Module Code"; 718 720 localizedStrings["Multi-Entry"] = "Multi-Entry"; … … 1058 1060 localizedStrings["Socket"] = "Socket"; 1059 1061 localizedStrings["Sockets"] = "Sockets"; 1062 localizedStrings["Some examples of ways to use this script include (but are not limited to):"] = "Some examples of ways to use this script include (but are not limited to):"; 1060 1063 localizedStrings["Sort Ascending"] = "Sort Ascending"; 1061 1064 localizedStrings["Sort Descending"] = "Sort Descending"; … … 1122 1125 localizedStrings["Text Frame"] = "Text Frame"; 1123 1126 localizedStrings["Text Node"] = "Text Node"; 1127 localizedStrings["The Inspector Bootstrap Script is guaranteed to be the first script evaluated in any page, as well as any sub-frames."] = "The Inspector Bootstrap Script is guaranteed to be the first script evaluated in any page, as well as any sub-frames."; 1124 1128 localizedStrings["The \u201C%s\u201D audit failed"] = "The \u201C%s\u201D audit failed"; 1125 1129 localizedStrings["The \u201C%s\u201D audit is unsupported"] = "The \u201C%s\u201D audit is unsupported"; … … 1128 1132 localizedStrings["The \u201C%s\u201D audit threw an error"] = "The \u201C%s\u201D audit threw an error"; 1129 1133 localizedStrings["The \u201C%s\u201D\ntable is empty."] = "The \u201C%s\u201D\ntable is empty."; 1134 localizedStrings["The contents and enabled state will be preserved across Web Inspector sessions."] = "The contents and enabled state will be preserved across Web Inspector sessions."; 1130 1135 localizedStrings["The page's content has changed"] = "The page's content has changed"; 1131 1136 localizedStrings["The resource was requested insecurely."] = "The resource was requested insecurely."; … … 1297 1302 localizedStrings["default"] = "default"; 1298 1303 localizedStrings["default prevented"] = "default prevented"; 1304 localizedStrings["ensuring that common debugging functions are available on every page via the Console"] = "ensuring that common debugging functions are available on every page via the Console"; 1299 1305 localizedStrings["for changes to take effect"] = "for changes to take effect"; 1300 1306 localizedStrings["invalid HAR"] = "invalid HAR"; … … 1308 1314 localizedStrings["non-string %s"] = "non-string %s"; 1309 1315 localizedStrings["originally %s"] = "originally %s"; 1316 localizedStrings["overriding built-in functions to log call traces or add `debugger` statements"] = "overriding built-in functions to log call traces or add `debugger` statements"; 1310 1317 localizedStrings["popup"] = "popup"; 1311 1318 localizedStrings["popup, toggle"] = "popup, toggle"; -
trunk/Source/WebInspectorUI/UserInterface/Controllers/NetworkManager.js
r251531 r251921 298 298 source = await WI.objectStores.general.get(NetworkManager.bootstrapScriptSourceObjectStoreKey); 299 299 300 if (!source) { 301 source = ` 302 /* 303 * ${WI.UIString("The Inspector Bootstrap Script is guaranteed to be the first script evaluated in any page, as well as any sub-frames.")} 304 * ${WI.UIString("It is evaluated immediately after the global object is created, before any other content has loaded.")} 305 * 306 * ${WI.UIString("Modifications made here will take effect on the next load of any page or sub-frame.")} 307 * ${WI.UIString("The contents and enabled state will be preserved across Web Inspector sessions.")} 308 * 309 * ${WI.UIString("Some examples of ways to use this script include (but are not limited to):")} 310 * - ${WI.UIString("overriding built-in functions to log call traces or add `debugger` statements")} 311 * - ${WI.UIString("ensuring that common debugging functions are available on every page via the Console")} 312 */ 313 `; 314 } 315 300 316 const target = null; 301 317 const url = null; 302 318 const sourceURL = NetworkManager.bootstrapScriptURL; 303 this._bootstrapScript = new WI.LocalScript(target, url, sourceURL, WI.Script.SourceType.Program, source || "", {injected: true, editable: true});319 this._bootstrapScript = new WI.LocalScript(target, url, sourceURL, WI.Script.SourceType.Program, source, {injected: true, editable: true}); 304 320 this._bootstrapScript.addEventListener(WI.SourceCode.Event.ContentDidChange, this._handleBootstrapScriptContentDidChange, this); 305 321
Note: See TracChangeset
for help on using the changeset viewer.