-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathwebService.js
More file actions
62 lines (41 loc) · 1.52 KB
/
webService.js
File metadata and controls
62 lines (41 loc) · 1.52 KB
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
import React, { Component } from 'react';
import { StyleSheet, Text, View } from 'react-native';
import {WebView} from 'react-native-webview'
class WebService extends Component{
constructor(props){
super(props);
this.state = {
}
}
render(){
let username = "Email";
let password = "Password";
let injectScriptUsername = "javascript:document.getElementById('username').value = '"+username+"'; javascript:document.getElementById('password').value = '"+password+"'; document.getElementById('login-button').click();";
return(
<WebView
injectedJavaScript={injectScriptUsername}
source={{ uri: 'https://profile.callofduty.com/cod/login' }}
// style={{ marginBottom: 500, marginLeft: 500, backgroundColor: 'black'}}
/>
)
}
}
const styles = StyleSheet.create({
container: {
borderColor: 'black',
borderWidth: 1,
color: 'black',
backgroundColor: '#000000',
height: '50%',
alignItems: 'center',
marginTop: 20
// paddingLeft: 85,
}, White: {
color: '#fff',
paddingBottom: 100,
fontWeight: 'bold' },
Black: {
color: '#000000'
},
});
export default WebService;