Skip to content

Commit

Permalink
Fixed Tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
dhrxvjhx committed Jan 9, 2021
1 parent 20353c6 commit 06d64d1
Show file tree
Hide file tree
Showing 5 changed files with 201 additions and 138 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Chrome's manifest file

manifest.json
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

A custom home page for your browser. Made for ~~Minimalists~~ Everyone

> Preview: https://dhruvjha11.github.io/Dertin/
> Preview: https://dhrxvjhx.github.io/Dertin/
## Usage:
> If you click a button on the site without searching for anything and it will take you to that website's homepage
Expand All @@ -26,9 +26,9 @@ Depending upon your web browser, the set up wil be slightly different. But it sh
2. Find _**On startup**_ in the settings
3. Set it to _**Open a specific page**_
4. Put this url there:
>https://dhruvjha11.github.io/Dertin/
>https://dhrxvjhx.github.io/Dertin/
#### B.
1. Go to [Chrome Extensions](https://chrome.google.com/webstore) and search for __*New Tab Redirect*__ or [Click here for recommended redirect tab extensions](https://chrome.google.com/webstore/detail/new-tab-redirect/icpgjfneehieebagbmdbhnlpiopdcmna)
2. Set Redirect Page to [Dertin's website](https://dhruvjha11.github.io/Dertin/)
>https://dhruvjha11.github.io/Dertin/
2. Set Redirect Page to [Dertin's website](https://dhrxvjhx.github.io/Dertin/)
>https://dhrxvjhx.github.io/Dertin/
96 changes: 60 additions & 36 deletions index.html
Original file line number Diff line number Diff line change
@@ -1,46 +1,70 @@
<!DOCTYPE html>
<html>
<head>
<link rel="icon" type="image/png" href="img/Asset-DE.png">
<link rel="stylesheet" type="text/css" href="styles/main.css">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/animate.min.css">
<script type="text/javascript" src="scripts/app.js"></script>
<meta name="viewport" content="width=device-width, initial-scale=1.0">

<title>Dertin</title>
</head>
<body onload=startTime()>
<img src="img/Asset-DE.png" alt="Dertin" class="animated fadeIn" style="width:300px;height:300px; display: block; margin-right: auto; margin-left: auto;">
<head>
<link rel="icon" type="image/png" href="img/Asset-DE.png" />
<link rel="stylesheet" type="text/css" href="styles/main.css" />
<link
rel="stylesheet"
href="https://cdn.jsdelivr.net/npm/[email protected]/animate.min.css"
/>
<meta name="viewport" content="width=device-width, initial-scale=1.0" />

<div class="dropdown" style="float:right;">
<button class="dropbtn">
<svg width="1em" height="1em" viewBox="0 0 16 16" class="bi bi-three-dots-vertical" fill="currentColor" xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd" d="M9.5 13a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0zm0-5a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0zm0-5a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0z"/>
</svg>
</button>
<title>New Tab | Dertin</title>
</head>
<body>
<img
src="img/Asset-DE.png"
alt="Dertin"
class="animated fadeIn"
/>

<div class="dropdown-content">
<a href="https://github.com/dhruvjha11/Dertin/issues">Need Help?</a>
<a href="https://github.com/dhruvjha11">Contact Dev</a>
</div>
<div class="dropdown" style="float: right">
<button class="dropbtn">
<svg
width="1em"
height="1em"
viewBox="0 0 16 16"
class="bi bi-three-dots-vertical"
fill="currentColor"
xmlns="http://www.w3.org/2000/svg"
>
<path
fill-rule="evenodd"
d="M9.5 13a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0zm0-5a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0zm0-5a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0z"
/>
</svg>
</button>

<div class="dropdown-content">
<a href="https://github.com/dhrxvjhx/Dertin/issues" target="_blank"
>Need Help?</a
>
<a href="https://github.com/dhrxvjhx" target="_blank">Contact Dev</a>
</div>
</div>
<br/>
<br />

<input
autocomplete="off"
class="animated fadeIn"
id="textbox"
type="text"
placeholder="Search..."
/>

<input autocomplete="off" class="animated fadeIn" id="textbox" type="text" placeholder="Search..." onkeydown="if (event.keyCode == 13 || event.which == 13) { location = getLocation + encodeURIComponent(document.getElementById('textbox').value);}" />

<br /><div class="animated fadeIn">
<button class="buttonstyle" onclick=youtube()>YouTube</button>
<button class="buttonstyle" onclick=github()>GitHub</button>
<button class="buttonstyle" onclick=reddit()>Reddit</button>
<button class="buttonstyle" onclick="search('https://www.google.com/search?q=')">Google</button>
<button class="buttonstyle" onclick=twitter()>Twitter</button>
<button class="buttonstyle" onclick=gmail()>Gmail</button>
<br />
<div class="animated fadeIn">
<button class="buttonstyle" id="youtube">YouTube</button>
<button class="buttonstyle" id="github">GitHub</button>
<button class="buttonstyle" id="reddit">Reddit</button>
<button class="buttonstyle" id="search">Google</button>
<button class="buttonstyle" id="twitter">Twitter</button>
<button class="buttonstyle" id="gmail">Gmail</button>
</div>

<p id="greetingMsg" class="animated fadeIn"></p>
<p id="clock" class="animated fadeIn"></p>
<p class="animated fadeIn"><a style="color: white; text-decoration: none; text-shadow: 0 0 20px rgba(255, 255, 255, 0.5), 0 0 20px rgba(10, 175, 230, 0)" href="/">🏠</a></p>


</body>
</html>
<p id="Dertin" class="animated fadeIn">Dertin</p>
</body>
<script type="text/javascript" src="scripts/app.js"></script>
</html>
31 changes: 26 additions & 5 deletions scripts/app.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,29 @@
var getLocation = "https://google.com/search?q="
// changes made to search because inline is not possible
getLocation = "https://google.com/search?q="

function search(getLocation){
location = getLocation + encodeURIComponent(document.getElementById('textbox').value) + '&ia=web';
document.getElementById("textbox").addEventListener("keyup", function(event) {
if (event.key === 13 || event.code === "Enter") {
event.preventDefault();
search();
}
});

document.getElementById("reddit").addEventListener("click", reddit);
document.getElementById("youtube").addEventListener("click", youtube);
document.getElementById("github").addEventListener("click", github);
document.getElementById("search").addEventListener("click", search);
document.getElementById("twitter").addEventListener("click", twitter);
document.getElementById("gmail").addEventListener("click", gmail);
window.onload = startTime();

function search(){
var txtBoxInput = document.getElementById('textbox').value
if (txtBoxInput == '' || txtBoxInput == '') {
location = "https://google.com"
}
else {
location = "https://google.com/search?q=" + encodeURIComponent(document.getElementById('textbox').value) + '&ia=web';
}
}

function reddit(){
Expand Down Expand Up @@ -75,8 +97,7 @@ function startTime() {
var s = today.getSeconds();
m = checkTime(m);
s = checkTime(s);
document.getElementById('clock').innerHTML =
h + ":" + m + ":" + s;
document.getElementById('clock').innerHTML = h + ":" + m + ":" + s;
document.getElementById('greetingMsg').innerHTML = greeting;
var t = setTimeout(startTime, 500);

Expand Down
Loading

0 comments on commit 06d64d1

Please sign in to comment.