docs-v2/assets/js
Jason Stirnaman 823459b276
Fix/influxdb urls (#3829)
* fix: set cookie to empty string if undefined.

* fix: indent.

* fix: run validation on every keyup, delayed by 500ms.

* fix: replacing URLs and hosts.
1. Safari (and FF?) don't support regex lookbehinds. Instead of a
   lookbehind, capture the preceding and following character of a
   matched hostname then check that they don't match URL delimiter
   characters (to avoid altering a full URL).
2. When replacing full URLs, match an optional port pattern to avoid
   partial replacement, e.g. if the previous URL was http://a.com,
   the user changed to http://a.com:90, and we've already replaced
   once, replace the whole URL, not
   just http://a.com with http://a.com:90.
Some refactoring for efficiency and debugging.

* fix: URL validation. Let URL() tell us if it's valid. If it's not, check the pieces with regex. Improve the domain pattern to require a host (not just a port number).

* Update assets/js/influxdb-url.js

Co-authored-by: Scott Anderson <sanderson@users.noreply.github.com>

Co-authored-by: Scott Anderson <sanderson@users.noreply.github.com>
2022-03-07 11:30:04 -06:00
..
content-interactions.js Fix/influxdb urls (#3829) 2022-03-07 11:30:04 -06:00
docs-themes.js added collapsable left nav styles and js 2019-01-11 10:21:33 -07:00
feature-callouts.js 2.0 GA and separate Cloud from OSS (#1805) 2020-11-11 09:52:14 -07:00
flux-current-time.js Work with Prometheus metrics in Flux (#3232) 2021-10-18 16:25:20 -06:00
flux-group-keys.js Flux restructure (#3141) 2021-09-16 16:19:21 -06:00
fullscreen-code.js Added abilitly to toggle codeblocks to fullscreen (#3811) 2022-02-28 13:56:17 -07:00
influxdb-url.js Fix/influxdb urls (#3829) 2022-03-07 11:30:04 -06:00
jquery-3.5.0.min.js groundwork for influxdb url select 2020-04-16 09:59:35 -06:00
js.cookie.js finished out topnav along with js interactions 2018-12-20 23:31:58 -07:00
keybindings.js Flux VS Code extension (#1858) 2020-11-19 13:41:21 -07:00
list-filters.js Flux restructure (#3141) 2021-09-16 16:19:21 -06:00
notifications.js added js for notification cookies and interactions 2020-09-10 14:11:56 -06:00
search-interactions.js finalized new homepage, resolves #1327 2020-09-02 12:16:00 -06:00
sidebar-toggle.js added collapsable left nav styles and js 2019-01-11 10:21:33 -07:00
version-selector.js added product selector, updated search placeholder 2020-09-02 12:15:53 -06:00