-
Notifications
You must be signed in to change notification settings - Fork 15
/
app.html
66 lines (59 loc) · 1.52 KB
/
app.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
<!--
For now Fastlane need to be run in a webwiew
because Uber Api can only authorize users with callbacks
and surge also need the callback id to confirme the
rate limit. This is not optimal but it works for now...
-->
<style>
body {
width: 340px;
height: 495px;
padding: 0;
margin: 14px 0 0;
position: relative;
}
body:after {
bottom: 100%;
left: 50%;
border: solid transparent;
content: '';
height: 0;
width: 0;
position: absolute;
pointer-events: none;
border-color: rgba(255, 255, 255, 0);
border-bottom-color: #fff;
border-width: 14px;
margin-left: -14px;
}
</style>
<webview
id="uber"
src="http://localhost:5555"
width="340"
height="515">
</webview>
<script>
/* eslint prefer-template: 0 */
const webview = document.getElementById('uber');
// This is needed to remove facebook login and hide links to browse uber.com
webview.addEventListener('dom-ready', () => {
webview.insertCSS([
'.btn--link',
'.text-uber-white',
'p.text--center',
'.btn--facebook',
].join() + '{display:none!important;}');
webview.insertCSS(
'header.contextual {position:fixed !important;} .wrapper {padding-top: 80px !important;} html {background: #000!important;}'
);
// webview.addEventListener('page-title-updated', function(title, explicitSet) {
// if (!explicitSet) {
// setTimeout(() => {
// webview.goBack();
// }, 3000);
// }
// });
// webview.openDevTools();
});
</script>