Skip to content

Commit d3b95d0

Browse files
committed
no message
1 parent 8cebda6 commit d3b95d0

32 files changed

+21024
-0
lines changed

.idea/.name

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/dictionaries/sergiuLucaci.xml

Lines changed: 13 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/encodings.xml

Lines changed: 6 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/firstExtension.iml

Lines changed: 8 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/misc.xml

Lines changed: 13 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/modules.xml

Lines changed: 8 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/workspace.xml

Lines changed: 403 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

icon.png

1001 Bytes
Loading

icons.png

1001 Bytes
Loading

index.html

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
<!doctype html>
2+
<!--
3+
This page is shown when the extension button is clicked, because the
4+
"browser_action" field in manifest.json contains the "default_popup" key with
5+
value "index.html".
6+
-->
7+
<html>
8+
<head>
9+
<title>firstExtension</title>
10+
<title>draggin</title>
11+
<link rel="stylesheet" href="third/css/bootstrap.min.css">
12+
<link rel="stylesheet" href="third/css/bootstrap-theme.min.css">
13+
<link rel="stylesheet" href="style.css">
14+
<script src="third/jquery-1.11.3.js"></script>
15+
<script src="script.js"></script>
16+
<!--<script src="popup.js"></script>-->
17+
</head>
18+
<body>
19+
<div id="status">
20+
<div class="content">
21+
<div class="welcomePage">
22+
<h3>Welcome!</h3>
23+
<br><br><br>
24+
<button type="button" class="btn btn-lg btn-default" id="joinLink">join linkFlow</button>
25+
</div>
26+
<div class="signUpPage">
27+
<h3>Sharing with your team</h3>
28+
<br>
29+
<div class="row">
30+
<div class="col-xs-6 col-xs-offset-3">
31+
<input type="text" class="form-control" placeholder="Email" id="emailAddress">
32+
<p class="errorInput" id="errorInputEmail">Type a valid email address.</p>
33+
<input type="password" class="form-control top" placeholder="Password" id="emailPassword">
34+
<p class="errorInput" id="errorInputPassword">
35+
Your password must be at least three characters.</p>
36+
</div>
37+
</div>
38+
<br>
39+
<button type="button" class="btn btn-default" id="registerButton">Register</button>
40+
</div>
41+
</div>
42+
</div>
43+
<img id="image-result" hidden>
44+
</body>
45+
</html>

manifest.json

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
{
2+
"manifest_version": 2,
3+
4+
"name": "Getting started example",
5+
"description": "This extension shows a Google Image search result for the current page",
6+
"background": {
7+
"scripts": ["third/jquery-1.11.3.js","script.js"],
8+
"persistent": true
9+
},
10+
"content_scripts": [
11+
{
12+
"matches": ["https://www.facebook.com/"],
13+
"js": [
14+
"third/jquery-1.11.3.js",
15+
"script.js"],
16+
"run_at" : "document_start"
17+
}
18+
],
19+
"version": "1.0",
20+
21+
"browser_action": {
22+
"default_icon": "icon.png",
23+
"default_popup": "index.html",
24+
"default_title": "do not dare to click here!"
25+
},
26+
"permissions": [
27+
"tabs",
28+
"management",
29+
"activeTab",
30+
"https://ajax.googleapis.com/"
31+
],
32+
"web_accessible_resources": [
33+
"/*"
34+
]
35+
}

popup.js

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
// $(document).ready(function() {
2+
// alert('injected');
3+
//var detect = function (base, if_installed, if_not_installed) {
4+
// var s = document.createElement('script');
5+
// console.log("script: " + s);
6+
// s.onerror = if_not_installed;
7+
// s.onload = if_installed;
8+
// console.log(s);
9+
// document.body.appendChild(s);
10+
// console.log("src script" + s.src);
11+
// s.src = base + '/manifest.json';
12+
//};
13+
//detect('chrome-extension://' + "hnccmmpkbfmmmlfkamgmncadhhgmopjf",
14+
// function () {alert('boom!');},
15+
// function () {alert("buf. nothin")});
16+
//});
17+

script.js

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
/**
2+
* Created by sergiuLucaci on 1/7/16.
3+
*/
4+
5+
6+
$(document).ready(function() {
7+
8+
var testEmail = /^[A-Z0-9._%+-]+@([A-Z0-9-]+\.)+[A-Z]{2,4}$/i;
9+
10+
$("#joinLink").click(function() {
11+
console.log("i am clicked");
12+
$(".signUpPage").show();
13+
$(".welcomePage").hide();
14+
});
15+
16+
$("#registerButton").click(function() {
17+
var inputEmail = $("#emailAddress").val();
18+
var inputPassword = $("#emailPassword").val();
19+
console.log(inputEmail);
20+
21+
if ( testEmail.test(inputEmail) ) {
22+
console.log("what a correct email address");
23+
} else {
24+
$("#errorInputEmail").show();
25+
console.log("uo. that's a bad address. sry");
26+
}
27+
28+
if( inputPassword.length < 4 ) {
29+
$("#errorInputPassword").show();
30+
console.log("bigger password please");
31+
} else {
32+
console.log("oh, nice password.");
33+
}
34+
});
35+
36+
var detect = function (base, if_installed, if_not_installed) {
37+
console.log('injected');
38+
var s = document.createElement('script');
39+
s.onerror = if_not_installed;
40+
s.onload = if_installed;
41+
document.body.appendChild(s);
42+
s.src = base + '/manifest.json';
43+
};
44+
detect('chrome-extension://' + "hnccmmpkbfmmmlfkamgmncadhhgmopjf", function () {alert('boom, the extension exists!');},
45+
function () {alert("buf. nothin")});
46+
47+
});

style.css

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
/* Change blue textarea */
2+
textarea:hover,
3+
input:hover,
4+
textarea:active,
5+
input:active,
6+
textarea:focus,
7+
input:focus,
8+
button:focus,
9+
button:active,
10+
button:hover
11+
{
12+
outline:0px !important;
13+
-webkit-appearance:none;
14+
}
15+
16+
/* Status id */
17+
#status {
18+
width: 500px;
19+
height: 430px;
20+
max-width: 700px;
21+
}
22+
23+
.content {
24+
text-align: center;
25+
margin-top: 170px;
26+
}
27+
28+
/* Sing up page */
29+
.signUpPage {
30+
display: none;
31+
}
32+
33+
.top {
34+
margin-top: 6px;
35+
}
36+
37+
.errorInput {
38+
display: none;
39+
color: red;
40+
margin-top: -2px;
41+
font-size: 10px;
42+
}

0 commit comments

Comments
 (0)