Skip to content

Commit

Permalink
Adding Version 1.0.1 to Git
Browse files Browse the repository at this point in the history
  • Loading branch information
webdeveloper committed Jun 18, 2021
0 parents commit 70b6d3d
Show file tree
Hide file tree
Showing 14 changed files with 798 additions and 0 deletions.
128 changes: 128 additions & 0 deletions assets/css/app.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,128 @@
:root
{
--themeColor: #4169E1;
}

* { font-family: Ubuntu, Arial, sans-serif; }

body { overflow: hidden; }

.hide { display: none !important; }

.align-left { text-align: left; }

.align-center { text-align: center; }

.align-right { text-align: right; }

#ah-content
{
width: 320px;
height: 420px;
overflow: auto;
position: relative;
}

.heading
{
color: var(--themeColor);
}

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

ul > li
{
list-style-type: none;
padding: 10px 5px;
border: 1px solid #808080;
border-radius: 2px;
cursor: pointer;
}

ul > li:not(:first-child)
{
border-top: 0;
}

ul > li:hover
{
color: var(--themeColor);
}

@keyframes spin
{
0% { transform: rotate(0deg); }
100% { transform: rotate(360deg); }
}

#loading-overlay
{
display: inline-flex;
justify-content: center;
align-items: center;
position: absolute;
height: 100%;
width: 100%;
top: 0;
left: 0;
background: rgba(0, 0, 0, 0.7);
}

#loading-overlay::before
{
content: "";
display: inline-block;
border: 8px solid #fff;
border-radius: 50%;
border-top: 8px solid var(--themeColor);
width: 50px;
height: 50px;
animation: spin 1s linear infinite;
}

.form-field
{
display: inline-flex;
flex-direction: column;
}

h1, h2, h3, h4, h5, h6
{
/*margin-top: 0;*/
}

.text-theme
{
color: var(--themeColor);
}

.text-danger
{
color: #f00;
}

#savedSQLScripts
{
width: 100%;
}

.div-code
{
position: relative;
}

.div-actions
{
position: absolute;
top: 5px;
right: 5px;
}

.div-actions a
{
text-decoration: none;
}
143 changes: 143 additions & 0 deletions assets/css/prism.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,143 @@
/* PrismJS 1.23.0
https://prismjs.com/download.html#themes=prism&languages=markup+css+clike+javascript+sql */
/**
* prism.js default theme for JavaScript, CSS and HTML
* Based on dabblet (http://dabblet.com)
* @author Lea Verou
*/

code[class*="language-"],
pre[class*="language-"] {
color: black;
background: none;
text-shadow: 0 1px white;
font-family: Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace;
font-size: 1em;
text-align: left;
white-space: pre;
word-spacing: normal;
word-break: normal;
word-wrap: normal;
line-height: 1.5;

-moz-tab-size: 4;
-o-tab-size: 4;
tab-size: 4;

-webkit-hyphens: none;
-moz-hyphens: none;
-ms-hyphens: none;
hyphens: none;
}

pre[class*="language-"]::-moz-selection, pre[class*="language-"] ::-moz-selection,
code[class*="language-"]::-moz-selection, code[class*="language-"] ::-moz-selection {
text-shadow: none;
background: #b3d4fc;
}

pre[class*="language-"]::selection, pre[class*="language-"] ::selection,
code[class*="language-"]::selection, code[class*="language-"] ::selection {
text-shadow: none;
background: #b3d4fc;
}

@media print {
code[class*="language-"],
pre[class*="language-"] {
text-shadow: none;
}
}

/* Code blocks */
pre[class*="language-"] {
padding: 1em;
margin: .5em 0;
overflow: auto;
}

:not(pre) > code[class*="language-"],
pre[class*="language-"] {
background: #f5f2f0;
}

/* Inline code */
:not(pre) > code[class*="language-"] {
padding: .1em;
border-radius: .3em;
white-space: normal;
}

.token.comment,
.token.prolog,
.token.doctype,
.token.cdata {
color: slategray;
}

.token.punctuation {
color: #999;
}

.token.namespace {
opacity: .7;
}

.token.property,
.token.tag,
.token.boolean,
.token.number,
.token.constant,
.token.symbol,
.token.deleted {
color: #905;
}

.token.selector,
.token.attr-name,
.token.string,
.token.char,
.token.builtin,
.token.inserted {
color: #690;
}

.token.operator,
.token.entity,
.token.url,
.language-css .token.string,
.style .token.string {
color: #9a6e3a;
/* This background color was intended by the author of this theme. */
background: hsla(0, 0%, 100%, .5);
}

.token.atrule,
.token.attr-value,
.token.keyword {
color: #07a;
}

.token.function,
.token.class-name {
color: #DD4A68;
}

.token.regex,
.token.important,
.token.variable {
color: #e90;
}

.token.important,
.token.bold {
font-weight: bold;
}
.token.italic {
font-style: italic;
}

.token.entity {
cursor: help;
}

Binary file added assets/images/ah128.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 assets/images/ah16.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 assets/images/ah32.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 assets/images/ah48.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
34 changes: 34 additions & 0 deletions assets/js/app.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
let addedWebsites;

function refreshAddedWebsites(callback)
{
chrome.storage.sync.get({"adminerWebsites": []}, function (result) {
addedWebsites = result.adminerWebsites;

chrome.contextMenus.update("ah-ctxmenu-save-script", {
documentUrlPatterns: addedWebsites.map(w => ( w + (w[w.length - 1] != "/" ? "/" : "") + "*" )),
});

if(typeof(callback) == "function") {
callback(addedWebsites);
}
});
}

function addWebsite(website, callback)
{
refreshAddedWebsites(function (websites) {
websites.push(website);

chrome.storage.sync.set({ "adminerWebsites": websites }, function () {
refreshAddedWebsites(callback);
});
});
}

function updateWebsitesList(websitesList, callback)
{
chrome.storage.sync.set({ "adminerWebsites": websitesList }, function () {
refreshAddedWebsites(callback);
});
}
Loading

0 comments on commit 70b6d3d

Please sign in to comment.