Skip to content

Commit

Permalink
edited manifest file and fixed square
Browse files Browse the repository at this point in the history
  • Loading branch information
jacobkim9881 committed Aug 27, 2020
1 parent e690530 commit 76eb647
Show file tree
Hide file tree
Showing 7 changed files with 30 additions and 17 deletions.
29 changes: 15 additions & 14 deletions contents.js
Original file line number Diff line number Diff line change
Expand Up @@ -163,35 +163,36 @@ function waterWave(test, e) {
obj.style.position = 'fixed';
let changedX;
let changedY;
let color = 'hsl(201, 53%, 50%)'

switch (pos) {
case 'lu':
changedX = x - 1000;
changedY = y - 1000;
obj.style.borderRadius = '100% 0% 0% 0%';
obj.style.borderLeft = '1px solid blue';
obj.style.borderTop = '1px solid blue';
obj.style.borderLeft = `1px solid ${color}`;
obj.style.borderTop = `1px solid ${color}`;
break;
case 'ru':
changedX = x;
changedY = y - 1000;
obj.style.borderRadius = '0% 100% 0% 0%';
obj.style.borderRight = '1px solid blue';
obj.style.borderTop = '1px solid blue';
obj.style.borderRight = `1px solid ${color}`;
obj.style.borderTop = `1px solid ${color}`;
break;
case 'ld':
changedX = x - 1000;
changedY = y;
obj.style.borderRadius = '0% 0% 0% 100%';
obj.style.borderLeft = '1px solid blue';
obj.style.borderBottom = '1px solid blue';
obj.style.borderLeft = `1px solid ${color}`;
obj.style.borderBottom = `1px solid ${color}`;
break;
case 'rd':
changedX = x;
changedY = y;
obj.style.borderRadius = '0% 0% 100% 0%';
obj.style.borderRight = '1px solid blue';
obj.style.borderBottom = '1px solid blue';
obj.style.borderRight = `1px solid ${color}`;
obj.style.borderBottom = `1px solid ${color}`;
break;
}
obj.animate([
Expand All @@ -203,9 +204,9 @@ function waterWave(test, e) {
left: changedX + 'px',
width: 1000 + 'px',
height: 1000 + 'px'}
], 8000)
], 500)
document.body.appendChild(obj);
setTimeout(() => obj.remove(), 8000);
setTimeout(() => obj.remove(), 500);
}
makeQuater(e, 'lu');
makeQuater(e, 'ru');
Expand Down Expand Up @@ -340,8 +341,8 @@ function giveBubble(obj, e) {
} else {
ran = - 1;
}
let ranXpos = Math.trunc(Math.random() * 30) + parseInt(e.clientX, 10);
let ranYpos = Math.trunc(Math.random() * 20 * ran) + parseInt(e.clientY, 10);
let ranXpos = Math.trunc(Math.random() * 40) + parseInt(e.clientX, 10);
let ranYpos = Math.trunc(Math.random() * 30 * ran) + parseInt(e.clientY, 10);
let ran10 = Math.trunc(Math.random() * 10) + 10;
let ran360 = Math.trunc(Math.random() * 360);
let ran360Two = Math.trunc(Math.random() * 360);
Expand Down Expand Up @@ -690,7 +691,7 @@ function giveBubble(obj, e) {
case 'giveWaterWave':
document.body.removeEventListener('mousemove', curFunc);
chrome.runtime.sendMessage(undefined, 'waterWave');
curFunc = baseLeafs;
curFunc = baseWaterWave;
break;
case 'giveHeart':
document.body.removeEventListener('mousemove', curFunc);
Expand Down Expand Up @@ -724,7 +725,7 @@ function giveBubble(obj, e) {
break;
case 'waterWave' :
document.body.removeEventListener('mousemove', curFunc);
curFunc = baseLeafs;
curFunc = baseWaterWave;
break;
case 'heart' :
document.body.removeEventListener('mousemove', curFunc);
Expand Down
Binary file added images/foot.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/foot16.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/foot32.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/foot64.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 8 additions & 2 deletions manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,14 @@
"persistent": false
},
"page_action": {
"default_popup": "popup.html"
"default_popup": "popup.html",
"default_icon": {
"16": "images/foot16.png",
"32": "images/foot32.png",
"64": "images/foot64.png",
"128": "images/foot.png"
}
},
"description": "This is test!",
"description": "Adding funny effects when you do with your mouse. This extension make your mouse pointer more beautifully.",
"manifest_version": 2
}
8 changes: 7 additions & 1 deletion popup.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,25 @@
<head>
<style>
body {
width: 300px;
width: 270px;
}
button {
height: 32px;
width: 32px;
outline: none;
padding: 5px;
border: none;
}
.buttonDiv :hover {
cursor: pointer;
}
h4 {
border-bottom: 1px solid black;
padding-bottom: 10px;
}
.buttonDiv {
margin: 5px;
padding: 0px;
}
#bubble {
background-image: url('./images/bubble/buble32.png');
Expand Down

0 comments on commit 76eb647

Please sign in to comment.