manifest.json
"manifest_version": 2,
"name": "Sample Extension",
"description": "Sample Extension",
"version": "1.0",
"browser_action": {
"default_popup": "popup.html"
},
"background":{
"scripts":["background.js"]
},
"permissions": [
"http://localhost/*"
]
popup.html
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<link rel="stylesheet" href="bootstrap-3.3.7-
dist/css/bootstrap.min.css">
<script src="jquery-3.2.1.slim.min.js"></script>
<script src="bootstrap-3.3.7-dist/js/bootstrap.min.js"></script>
<style>
.container{
padding: 5px;
min-width: 250px;
}
</style>
<script src="popup.js"></script>
</head>
<body>
<div class="container">
<form action = "http://localhost/db1/script.php" method="post">
<div class="form-group">
<label for="usr">Usuário:</label>
<input type="text" id="usuario" name="usuario" class="form-control"
value="vitor">
</div>
<div class="form-group">
<label for="snh">Senha:</label>
<input type="password" name="senha" class="form-control" >
</div>
<div class="form-group">
<button class="btn ">
<localized name="btnEntrar">Entrar</localized>
</button>
</div>
</form>
</div>
</body>
</html>
script.php
<?php
var_dump($_POST);
?>
When I do the receive test in script.php in the browser it works now when I do the extension does not work.