GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Moved injection logic to content script · react/react@85c7211

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • packages/react-devtools-extensions/src
    • inject.js
    • injectGlobalHook.js
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎packages/react-devtools-extensions/src/inject.js‎

Copy file name to clipboardExpand all lines: packages/react-devtools-extensions/src/inject.js
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/* global chrome */
22

3-
export default function inject(scriptName: string, done: ? Function) {
3+
export default function inject(scriptName: string, done: ?Function) {
44
const source = `
55
(function () {
66
window.postMessage({ source: 'react-devtools-inject-script', scriptName: "${scriptName}" }, "*");
Collapse file

‎packages/react-devtools-extensions/src/injectGlobalHook.js‎

Copy file name to clipboardExpand all lines: packages/react-devtools-extensions/src/injectGlobalHook.js
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,8 @@ window.addEventListener('message', function(evt) {
3737
reactBuildType: evt.data.reactBuildType,
3838
};
3939
chrome.runtime.sendMessage(lastDetectionResult);
40-
} else if (evt.data.source === 'react-devtools-inject-backend' && evt.data.scriptName) {
41-
//Inject backend
40+
} else if (evt.data.source === 'react-devtools-inject-script' && evt.data.scriptName) {
41+
//Inject the specified script
4242
var script = document.constructor.prototype.createElement.call(document, 'script');
4343
script.src = evt.data.scriptName;
4444
script.charset = "utf-8";

0 commit comments

Comments
0 (0)
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.