Skip to content

Commit

Permalink
Chrome extension
Browse files Browse the repository at this point in the history
  • Loading branch information
mikepsinn committed Nov 18, 2023
1 parent f3d90ca commit 618187b
Show file tree
Hide file tree
Showing 11 changed files with 1,701 additions and 0 deletions.
23 changes: 23 additions & 0 deletions apps/dfda-1/public/app/public/chrome_appearance.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<html id="t" i18n-values="dir:textdirection" class="focus-outline-visible" dir="ltr" hasflashplugin="" flashpluginsupportsclearsitedata="" enablepepperflashsettings=""><head>
<meta charset="utf-8">
<title i18n-content="optionsPageTitle">Settings</title>
<link rel="stylesheet" href="chrome_extension/options/options-shared.css">
<link rel="stylesheet" href="chrome_extension/options/options-content.css">
</head>

<body class="uber-frame" i18n-values=".style.fontFamily:fontfamily;.style.fontSize:fontsize" style="font-family: 'Segoe UI', Tahoma, sans-serif; font-size: 75%;">

<div id="mainview" style="background: white">
<div id="mainview-content">
<div id="page-container">
<div id="settings" class="page">
<header style="-webkit-transform: none;">
<h1 i18n-content="settingsTitle">Appearance</h1>
</header>

</div>
</div>
</div>
</div>
</body>
</html>
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
/* Copyright (c) 2012 The Chromium Authors. All rights reserved.
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file. */

body {
overflow: hidden;
padding-top: 20px;
}

html.changing-content body {
-webkit-transition: -webkit-transform 100ms;
}

h1 {
-webkit-margin-after: 1em;
/* This value must match the top padding of the uber page header. */
-webkit-margin-before: 21px;
-webkit-margin-start: 23px;
color: rgb(92, 97, 102);
}

ul {
list-style-type: none;
padding: 0;
}

li {
-webkit-border-start: 6px solid transparent;
-webkit-padding-start: 18px;
-webkit-user-select: none;
cursor: pointer;
}

li:hover {
color: #777;
}

li.selected {
-webkit-border-start-color: rgb(78, 87, 100);
cursor: default;
pointer-events: none;
}

#helpNavItem {
margin-top: 27px;
}

button {
background-color: white;
border: 0;
color: #999;
cursor: pointer;
font: inherit;
line-height: 17px;
margin: 6px 0;
padding: 0;
}

.selected > button {
color: rgb(70, 78, 90);
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
var onNavigationButtonClicked = function()
{
var buttonId = this.id;
if(buttonId == "appearanceButton")
{
// Set appearanceButton selected
var button = document.getElementById("appearanceButton");
button.className = button.className + " selected";

// Remove selected from settingsButton
button = document.getElementById("settingsButton");
button.className = button.className.replace("selected", "");

// Show appearanceContent
var contents = document.getElementById("appearanceContent");
contents.style.zIndex = 3;

// Hide settingsContent
contents = document.getElementById("settingsContent");
contents.style.zIndex = 1;
}
else if(buttonId == "settingsButton")
{
var button = document.getElementById("settingsButton");
button.className = button.className + " selected";

button = document.getElementById("appearanceButton");
button.className = button.className.replace(" selected", "");

var contents = document.getElementById("settingsContent");
contents.style.zIndex = 3;

contents = document.getElementById("appearanceContent");
contents.style.zIndex = 1;
}
}

document.addEventListener('DOMContentLoaded', function ()
{
document.getElementById('appearanceButton').onclick=onNavigationButtonClicked;
document.getElementById('settingsButton').onclick=onNavigationButtonClicked;
});
Loading

0 comments on commit 618187b

Please sign in to comment.