Skip to content

Commit

Permalink
d o o
Browse files Browse the repository at this point in the history
  • Loading branch information
Alstroemerys committed Apr 8, 2023
1 parent f266b1c commit 93f5a38
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 16 deletions.
33 changes: 18 additions & 15 deletions FirefoxExtension/image_converter.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,25 +4,28 @@
<header>Changing Contrast Mode</header>
</head>
<canvas id="canvas"></canvas>
<script type = "text/javascript">

var currentLocation = window.location
var imageArray = [] //to make an empty array

currentLocation.forEach(element => {
curURL = changeImage(element) // creates a new url for the altered element
changeURL(curURL) // gives the file the new url for element
});

</script>

<body>
<h1>Turn on high contrast mode?</h1>
<button onclick id = "contrastButton">Yes</button>
<button onclick id = "cancelButton">Cancel</button>
<button onclick id = "clicked()">Yes</button>
<button onclick id = "cancled()">Cancel</button>
<div id="switchToFont"><a href="options.html">Switch to change font mode</a></div>
<script>


<script type = "text/javascript">
let currentWindow;
function clicked(){
var currentLocation = window.location
var imageArray = [] //to make an empty array

currentLocation.forEach(element => {
curURL = changeImage(element) // creates a new url for the altered element
changeURL(curURL) // gives the file the new url for element
});
}

function cancled(){
currentWindow.close()
}
</script>
</body>
</html>
2 changes: 1 addition & 1 deletion FirefoxExtension/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"content_scripts": [
{
"matches": ["<all_urls>"],
"js": ["content.js"]
"js": ["content.js", "image_converter.js"]
}
]
}
2 changes: 2 additions & 0 deletions FirefoxExtension/options.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ <h1>Choose a font:</h1>
</select>
<br><br>
<button id="save-button">Save</button>
<div id="switchToContrast"><a href="image_converter.html">Switch to change contrast</a></div>

<script>
// When the save button is clicked, save the selected font preference
document.getElementById('save-button').addEventListener('click', function() {
Expand Down

0 comments on commit 93f5a38

Please sign in to comment.