summaryrefslogtreecommitdiffstats
path: root/src/core/resources/devtools_discovery_page.html
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@qt.io>2017-09-27 17:35:58 +0200
committerAllan Sandfeld Jensen <allan.jensen@qt.io>2017-10-13 12:26:54 +0000
commit052e79299f4ada27eacc89ab36ddafda2e91a4db (patch)
treeff2e1d7d8e4eb69c902cc69d4914282cc3be25f7 /src/core/resources/devtools_discovery_page.html
parent4c1cde9a1909162fbddeabd958a5f5acc43c83d6 (diff)
Clean up remote devtools implementation
Rename the file after the contents has been refactored being different classes, and switch to using Chromium discover HTML page which we now have available and which works. Change-Id: Ic04a56471be3a49e5d1dd4b1f914eda927272d89 Reviewed-by: Viktor Engelmann <viktor.engelmann@qt.io>
Diffstat (limited to 'src/core/resources/devtools_discovery_page.html')
-rw-r--r--src/core/resources/devtools_discovery_page.html140
1 files changed, 0 insertions, 140 deletions
diff --git a/src/core/resources/devtools_discovery_page.html b/src/core/resources/devtools_discovery_page.html
deleted file mode 100644
index d37dbfcf4..000000000
--- a/src/core/resources/devtools_discovery_page.html
+++ /dev/null
@@ -1,140 +0,0 @@
-<html>
-<head>
-<title>QtWebEngine Remote Debugging</title>
-<style>
-body {
- color: #222;
- font-family: Helvetica, Arial, sans-serif;
- margin: 0;
- text-shadow: rgba(255, 255, 255, 0.496094) 0px 1px 0px;
-}
-
-#caption {
- font-size: 16px;
- margin-top: 15px;
- margin-bottom: 10px;
- margin-left: 20px;
- height: 20px;
- text-align: left;
-}
-
-#items {
- display: flex;
- flex-direction: column;
- margin: 10px;
-}
-
-.item {
- color: #222;
- display: flex;
- flex-direction: row;
- text-decoration: none;
- padding: 10px;
- -webkit-transition-property: background-color, border-color;
- -webkit-transition: background-color 0.15s, 0.15s;
- -webkit-transition-delay: 0ms, 0ms;
-}
-
-.item:not(.connected):hover {
- background-color: rgba(242, 242, 242, 1);
- border-color: rgba(110, 116, 128, 1);
- color: black;
-}
-
-.item.connected:hover {
- border-color: rgba(184, 184, 184, 1);
- color: rgb(110, 116, 128);
-}
-
-.description {
- display: flex;
- flex-direction: column;
-}
-
-.title, .subtitle {
- font-size: 13px;
- margin: 4px 0px 0px 6px;
- overflow: hidden;
- padding-left: 20px;
-}
-
-.title {
- background-repeat: no-repeat;
- background-size: 16px;
- font-size: 15px;
-}
-
-
-</style>
-
-<script>
-
-function onLoad() {
- var tabsListRequest = new XMLHttpRequest();
- tabsListRequest.open('GET', '/json/list', true);
- tabsListRequest.onreadystatechange = onReady;
- tabsListRequest.send();
-}
-
-function onReady() {
- if(this.readyState == 4 && this.status == 200) {
- if(this.response != null)
- var responseJSON = JSON.parse(this.response);
- for (var i = 0; i < responseJSON.length; ++i)
- appendItem(responseJSON[i]);
- }
-}
-
-function overrideFrontendUrl(item) {
- if (window.location.hash) {
- var overridden_url = window.location.hash.substr(1);
- var ws_suffix = item.webSocketDebuggerUrl.replace('ws://', 'ws=');
- if (overridden_url.indexOf('?') == -1)
- return overridden_url + '?' + ws_suffix;
- else
- return overridden_url + '&' + ws_suffix;
- }
- return item.devtoolsFrontendUrl;
-}
-
-function appendItem(item_object) {
- var item_element;
- if (item_object.devtoolsFrontendUrl) {
- item_element = document.createElement('a');
- item_element.href = overrideFrontendUrl(item_object);
- item_element.title = item_object.title;
- } else {
- item_element = document.createElement('div');
- item_element.className = 'connected';
- item_element.title = 'The tab already has an active debug session';
- }
- item_element.classList.add('item');
-
- var description = document.createElement('div');
- description.className = 'description';
-
- var title = document.createElement('div');
- title.className = 'title';
- title.textContent = item_object.description || item_object.title;
- title.style.cssText = 'background-image:url(' +
- item_object.faviconUrl + ')';
- description.appendChild(title);
-
- var subtitle = document.createElement('div');
- subtitle.className = 'subtitle';
- subtitle.textContent = (item_object.url || '').substring(0, 300);
- description.appendChild(subtitle);
-
- item_element.appendChild(description);
-
- document.getElementById('items').appendChild(item_element);
-}
-</script>
-</head>
-<body onload='onLoad()'>
- <div id='caption'>Inspectable pages</div>
- <hr>
- <div id='items'>
- </div>
-</body>
-</html>