diff --git a/polygerrit-ui/README.md b/polygerrit-ui/README.md index 461e2b9a14..41f2ec7493 100644 --- a/polygerrit-ui/README.md +++ b/polygerrit-ui/README.md @@ -46,6 +46,9 @@ simply execute: ```sh ./polygerrit-ui/run-server.sh + +// or +npm run start ``` Then visit . @@ -185,7 +188,7 @@ npm run polylint ## Template Type Safety -> **Warning**: This feature is temporary disabled, because it doesn't work with Polymer 2 and Polymer 3. +> **Warning**: This feature is temporary disabled, because it doesn't work with Polymer 2 and Polymer 3. Some of the checks are made by polymer linter. diff --git a/polygerrit-ui/server.go b/polygerrit-ui/server.go index c45e229362..ba52ce83c1 100644 --- a/polygerrit-ui/server.go +++ b/polygerrit-ui/server.go @@ -43,8 +43,6 @@ var ( host = flag.String("host", "gerrit-review.googlesource.com", "Host to proxy requests to") scheme = flag.String("scheme", "https", "URL scheme") cdnPattern = regexp.MustCompile("https://cdn.googlesource.com/polygerrit_ui/[0-9.]*") - webComponentPattern = regexp.MustCompile("webcomponentsjs-p2") - grAppPattern = regexp.MustCompile("gr-app-p2") bundledPluginsPattern = regexp.MustCompile("https://cdn.googlesource.com/polygerrit_assets/[0-9.]*") ) @@ -189,13 +187,9 @@ func rewriteHostPage(reader io.Reader) io.Reader { buf.ReadFrom(reader) original := buf.String() - // Replace the webcomponentsjs-p2 with webcomponentsjs - replaced := webComponentPattern.ReplaceAllString(original, "webcomponentsjs") - replaced = grAppPattern.ReplaceAllString(replaced, "gr-app") - // Simply remove all CDN references, so files are loaded from the local file system or the proxy // server instead. - replaced = cdnPattern.ReplaceAllString(replaced, "") + replaced := cdnPattern.ReplaceAllString(original, "") // Modify window.INITIAL_DATA so that it has the same effect as injectLocalPlugins. To achieve // this let's add JavaScript lines at the end of the snippet that also