Skip to content

Commit

Permalink
Remove references to quotes
Browse files Browse the repository at this point in the history
  • Loading branch information
beatles1 committed Mar 26, 2024
1 parent 4b56f4e commit 105fdb7
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 23 deletions.
2 changes: 1 addition & 1 deletion Clean Tab/css/newtab.css
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ body {
color: #cccccc;
}

#quote {
#attr {
padding:6px 15px 6px 15px;

background: rgba(0, 0, 0, 0.4);
Expand Down
23 changes: 11 additions & 12 deletions Clean Tab/js/newtab.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@ window.onload = function() {
var useNotes = true;
var useApps = true;
var useClock = true;
var useQuote = true;
var quoteCat = "";
var useAttr = true;

// Options
function applyOptions() {
Expand Down Expand Up @@ -37,9 +36,9 @@ window.onload = function() {
document.getElementById("options").style.display = "none";
}

if (options["quote"]) {
document.getElementById("quote").style.display = "none";
useQuote = false;
if (options["attr"]) {
document.getElementById("attr").style.display = "none";
useAttr = false;
}

if (options["defaultBG"]) {
Expand Down Expand Up @@ -88,11 +87,11 @@ window.onload = function() {

} else if (bgType == "default") { // Load Local Image
loadBG(Math.floor((Math.random() * localBGs) + 1));
useQuote = false;
useAttr = false;
} else if (bgType == "extra") { // Load Manual Image
var bg = Math.floor((Math.random() * (extraBGs.length)));
loadBG(extraBGs[bg]);
useQuote = false;
useAttr = false;
}

// Notes
Expand Down Expand Up @@ -133,15 +132,15 @@ window.onload = function() {
setInterval(updateClock, 500)
}

// Quotes
function displayQuote() {
// Unsplash Attribution
function displayAttr() {
document.getElementById("unsplashLink").textContent = localStorage.getItem("unsplashUserName");
document.getElementById("unsplashLink").href = localStorage.getItem("unsplashUserURL") + "?utm_source=CleanTab&utm_medium=referral";
}

if (useQuote) {
displayQuote();
if (useAttr) {
displayAttr();
} else {
document.getElementById("quote").style.display = "none";
document.getElementById("attr").style.display = "none";
}
}
10 changes: 3 additions & 7 deletions Clean Tab/js/options.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
var avaliableOptions = ["clock", "search", "notes", "quote", "options", "defaultBG", "unsplashBG"];
var avaliableOptions = ["clock", "search", "notes", "attr", "options", "defaultBG", "unsplashBG"];

window.onload = function() {

Expand Down Expand Up @@ -46,19 +46,15 @@ window.onload = function() {
setTimeout(function() {
status.textContent = "";
}, 1000);

localStorage.setItem("quoteTime", 0);
}

function loadOptions() {
var options = {};
options = JSON.parse(localStorage.getItem("options"));

for (var id in options) {
if (id != "quoteCat") {
var val = options[id]
document.getElementById(id +"Opt").checked = val;
}
var val = options[id]
document.getElementById(id +"Opt").checked = val;
}

var urls = {};
Expand Down
2 changes: 1 addition & 1 deletion Clean Tab/newtab.html
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

<div id="alignBottom">
<div contentEditable="true" id="pad" data-text="Notes..."></div>
<div id="quote"><a href="#" id="unsplashLink"></a> - <a href="https://unsplash.com/?utm_source=CleanTab&utm_medium=referral">Unsplash</a></div>
<div id="attr"><a href="#" id="unsplashLink"></a> - <a href="https://unsplash.com/?utm_source=CleanTab&utm_medium=referral">Unsplash</a></div>
</div>

<div id="options">
Expand Down
3 changes: 1 addition & 2 deletions Clean Tab/options.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ <h1>Clean Tab Options</h1>
<label><input type="checkbox" id="clockOpt"> Disable Clock</label>
<label><input type="checkbox" id="searchOpt"> Disable Search</label>
<label><input type="checkbox" id="notesOpt"> Disable Notes</label>
<label><input type="checkbox" id="quoteOpt"> Disable Unsplash Attribution</label>
<label><input type="checkbox" id="attrOpt"> Disable Unsplash Attribution</label>
<label><input type="checkbox" id="optionsOpt"> Disable Options Link</label>
<br>

Expand All @@ -30,7 +30,6 @@ <h1>Clean Tab Options</h1>
<div id="credits">
Code by: <a href="http://edwardbowden.co.uk">Edward Bowden</a><br>
Photography by: <a href="credits.txt">Various</a> and <a href="http://unsplash.com">Unsplash.com</a><br>
Quotes by: <a href="https://forismatic.com">Forismatic.com</a>
</div>
</div>
</body>
Expand Down

0 comments on commit 105fdb7

Please sign in to comment.