Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
  • Loading branch information
Sav22999 authored Apr 18, 2019
1 parent 55ffc2c commit ceff8b0
Show file tree
Hide file tree
Showing 11 changed files with 646 additions and 0 deletions.
363 changes: 363 additions & 0 deletions LICENSE.md

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Accented letters
This extension permits you to copy an accented letter in the clipboard. You can choose if you want to copy a lower letter or an upper letter.
33 changes: 33 additions & 0 deletions accentedletters.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
<!---
Created by Saverio Morelli - saveriomorelli.com
version 1.0 - last update 2019-04-18
--->
<html>
<head>
<meta charset="utf-8">
<link rel="stylesheet" href="./css/accentedletters.css"/>
</head>

<body>
<div id="popup-content">
<div id="titles">
<input type="button" class="section_title" id="lowercase" value="Lowercase" /><input type="button" class="section_title" id="uppercase" value="Uppercase" />
</div>
<div id="letters">
<input type="button" class="letter" value="á" /><input type="button" class="letter" value="à" /><input type="button" class="letter" value="ä" /><input type="button" class="letter" value="â" /><input type="button" class="letter" value="å" /><input type="button" class="letter" value="ã" />
<br/>
<input type="button" class="letter" value="é" /><input type="button" class="letter" value="è" /><input type="button" class="letter" value="ë" /><input type="button" class="letter" value="ê" />
<br/>
<input type="button" class="letter" value="í" /><input type="button" class="letter" value="ì" /><input type="button" class="letter" value="ï" /><input type="button" class="letter" value="î" />
<br/>
<input type="button" class="letter" value="ó" /><input type="button" class="letter" value="ò" /><input type="button" class="letter" value="ö" /><input type="button" class="letter" value="ô" /><input type="button" class="letter" value="õ" />
<br/>
<input type="button" class="letter" value="ú" /><input type="button" class="letter" value="ù" /><input type="button" class="letter" value="ü" /><input type="button" class="letter" value="û" />
<br/>
<input type="button" class="letter" value="ñ" /><input type="button" class="letter" value="ý" /><input type="button" class="letter" value="ÿ" />
</div>
<input type="text" id="text_to_copy" style="display: none;" />
</div>
<script src="./js/accentedletters.js"></script>
</body>
</html>
79 changes: 79 additions & 0 deletions css/accentedletters.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
@font-face
{
font-family: zilla slab;
src: url("../font/zillaslab.otf");
}
body
{
background-color: transparent;
color: black;
}
#popup-content
{
width: 240px;
margin:-4px;
background-color: whitesmoke;
border: 1px solid transparent;
position: relative;
height: 281px;
}
#titles
{
position: absolute;
width: 240px;
height: 41px;
top: 0px;
left: 0px;
overflow: hidden;
}
#letters
{
position: absolute;
width: 240px;
height: 240px;
top: 41px;
left: 0px;
overflow: hidden;
}
.section_title
{
background-color: whitesmoke;
width: 120px;
padding: 5px;
color: black;
border: 0px;
border-radius: 0px;
font-size: 18px;
border-top: 4px solid transparent;
border-bottom: 4px solid transparent;
font-family: zilla slab;
margin: 0px;
cursor: pointer;
position: relative;
font-weight: bold;
transition: 0.5s;
}
.letter
{
background-color: whitesmoke;
padding: 5px;
width: 40px;
height: 40px;
color: black;
border: 0px;
border-radius: 0px;
font-size: 18px;
font-family: zilla slab;
margin: 0px;
cursor: pointer;
position: relative;
transition: 0.5s;
}
.section_title:hover, .letter:hover
{
background-color: rgb(218, 218, 218);
}
.section_title:active, .letter:active
{
background-color: rgb(179, 179, 179);
}
Binary file added font/zillaslab.otf
Binary file not shown.
Binary file added img/icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
98 changes: 98 additions & 0 deletions img/icon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
47 changes: 47 additions & 0 deletions js/accentedletters.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
n_letters = 26;

function copyLetter(text)
{
document.getElementById("text_to_copy").style.display="block";
document.getElementById("text_to_copy").value = text;
var copyText=document.getElementById("text_to_copy");
copyText.select();
document.execCommand("copy");
document.getElementById("text_to_copy").style.display="none";
}

function setLowercase()
{
for(var i=0;i<n_letters;i++)
{
document.getElementsByClassName("letter")[i].value = (document.getElementsByClassName("letter")[i].value).toLowerCase();

//document.getElementsByClassName("letter")[i].onclick = function(e){copyLetter(i);};
}
document.getElementById("lowercase").style.borderBottomColor="black";
document.getElementById("uppercase").style.borderBottomColor="transparent";
}

function setUppercase()
{
for(var i=0;i<n_letters;i++)
{
document.getElementsByClassName("letter")[i].value = (document.getElementsByClassName("letter")[i].value).toUpperCase();

//document.getElementsByClassName("letter")[i].onclick = function(e){copyLetter(i);};
}
document.getElementById("lowercase").style.borderBottomColor="transparent";
document.getElementById("uppercase").style.borderBottomColor="black";
}

setLowercase();

// button click events
document.getElementById("lowercase").onclick = function(e){setLowercase();};
document.getElementById("uppercase").onclick = function(e){setUppercase();};

for(var i=0;i<n_letters;i++)
{

document.getElementsByClassName("letter")[i].onclick = function(e){copyLetter(this.value);};
}
24 changes: 24 additions & 0 deletions manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
{
"manifest_version": 2,
"name": "Accented Letters",
"version": "1.0",

"description": "It permits just with a single click to copy an accented letter.",

"icons": {
"48": "./img/icon.png"
},

"applications": {
"gecko": {
"id": "accentedletters@saveriomorelli.com"
}
},

"browser_action": {
"default_icon": "./img/icon.png",
"default_title": "Accented Letters",
"default_popup": "./accentedletters.html"
}

}
Binary file added screenshots/Screenshot 1.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 screenshots/Screenshot 2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit ceff8b0

Please sign in to comment.