Skip to content

Commit

Permalink
Merge pull request #32 from ddasutein/dev
Browse files Browse the repository at this point in the history
Version 4.0.0 Release
  • Loading branch information
ddasutein authored Jun 20, 2023
2 parents 98c5c6d + 0c44469 commit ccbeb45
Show file tree
Hide file tree
Showing 23 changed files with 13,296 additions and 462 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@

.vscode/settings.json
autorename-workspace.code-workspace
/lib/TwitterAPI/TwitterAPIKey.js
86 changes: 86 additions & 0 deletions _locales/en/messages.json
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,10 @@
"message": "About"
},

"common_section_downloads": {
"message": "Downloads"
},

"common_section_file_name": {
"message": "File Name"
},
Expand Down Expand Up @@ -250,6 +254,10 @@
"message": "The Date/Time Format you entered is either empty or invalid"
},

"error_download_queue_invalid_file_name": {
"message": "You have entered an invalid file name"
},

"error_validation_prefix": {
"message": "The Prefix you entered contains special characters"
},
Expand Down Expand Up @@ -339,6 +347,10 @@
"message": "Enable notification when extension is updated"
},

"general_settings_store_images_to_custom_folder": {
"message": "Store Images to AutoRename Folder"
},

"twitter_settings_desciption": {
"message": "Customize File Name Format for Twitter"
},
Expand All @@ -359,6 +371,10 @@
"message": "Include Website Title [Twitter]"
},

"twitter_settings_save_image_to_folder_based_on_username": {
"message": "Save image to folder based on username"
},

"lineblog_settings_description": {
"message": "Customize File Name Format for LINE BLOG"
},
Expand Down Expand Up @@ -397,5 +413,75 @@

"reddit_settings_include_date": {
"message": "Include Date (Based on System Date)"
},

"downloads_section_description": {
"message": "View files that are pending for download"
},

"downloads_section_dialog_empty_queue_title": {
"message": "Download Queue is Empty"
},

"downloads_section_empty_queue": {
"message": "Download queue is empty. To get started, right click on an image > AutoRename > Add to Download Queue"
},

"downloads_section_dialog_remove_from_queue_title": {
"message": "Remove from Queue"
},

"downloads_section_dialog_enter_zip_name": {
"message": "Enter name for ZIP file"
},

"downloads_section_dialog_queue_cleared": {
"message": "Download Queue Cleared"
},

"downloads_section_dialog_enter_zip_name_button_create": {
"message": "Create ZIP"
},

"downloads_section_dialog_remove_from_queue_body": {
"message": "Are you sure you want to remove this?"
},

"downloads_section_count_label": {
"message": "Download Queue -"
},

"downloads_section_button_remove": {
"message": "Remove"
},

"downloads_section_button_download": {
"message": "Download"
},

"downloads_section_button_clear_queue": {
"message": "Clear Queue"
},

"downloads_section_saving_file": {
"message": "Saving file:"
},

"downloads_section_saving_file_2": {
"message": "to ZIP -",
"description": "Dash is required since the percentage is after that"
},

"downloads_section_saving_file_3": {
"message": "Your files are currently downloading. Please wait..."
},

"downloads_section_downlaod_in_progress": {
"message": "Download in progress"
},

"downloads_section_downlaod_complete_title": {
"message": "Download Complete"
}

}
Binary file added assets/icons8-clock-48.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/icons8-data-pending-48.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/icons8-download-48.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
111 changes: 107 additions & 4 deletions css/stylesheet.css
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
body {
background: #fff;
font-family: 'Segoe UI', 'Roboto', '-apple-system', 'BlinkMacSystemFont', 'Arial', sans-serif !important;
background: #eeeeee3b;
font-family: 'Segoe UI Variable Display', 'Segoe UI', 'Roboto', '-apple-system', 'BlinkMacSystemFont', 'Arial', sans-serif !important;
font-size: 1.1em;
margin: 0;
padding: 0;
Expand Down Expand Up @@ -364,20 +364,83 @@ a:-webkit-any-link {
grid-template-columns: auto auto;
margin-top: 20px;
}

.download-card {
align-items: center;
background-color: #fff;
box-shadow: 1px 1px 4px #e5e5e5;
border-radius: 5px;
display: flex;
flex-direction: row;
margin-bottom: 5px;
padding: 3px;
}

.download-card .download-card-actions {
visibility: hidden;
}

.download-card:hover .download-card-actions {
visibility: visible;
}

.image-thumbnail {
width: 40px;
height: 40px;
margin: 5px 5px 5px 5px;
object-fit: cover;
}

.download-card-site {
background-color: #000;
border-radius: 5px;
color: #fff;
display: inline-flex;
margin-top: 5px;
padding: 2px;
font-size: 12px;
}

.download-card-actions {
margin-left: auto;
}

.download-card-actions-button-primary {
background-color: #03B4D3;
color: #fff;
margin-right: 10px;

}


.download-card-actions-button-secondary {
background-color: #fff0;
margin-right: 1px;
}

.beta_tag {
padding: 4px;
background-color: #FFCD03;
color: black;
border-radius: 6px;
margin-left: 5px;
font-weight: 600;
}

/** EVERYTHING BELOW IS FOR DARK MODE ONLY **/

@media (prefers-color-scheme: dark) {

body {
background-color: #121212;
background-color: #161616;
}

hr {
border-top: 1px solid #1f1f1f;
}

.navbar {
background-color: #121212;
background-color: #181818;
border-right: 1px solid #1f1f1f;
color: #fff;
}
Expand Down Expand Up @@ -414,6 +477,46 @@ a:-webkit-any-link {
background: #242424;
box-shadow: 0 0 28px #00000059;
}

.download_card_container {
color: #B0B0B0;
}

.download-card {
background-color: #222222;
box-shadow: 1px 1px 4px #000;
}

.download-card-site {
color: #fff;
margin-top: 5px;
font-size: 12px;
}

.download-card-actions {
margin-left: auto;
}

.download-card-actions-button-primary {
background-color: #03B4D3;
color: #fff;
margin-right: 10px;

}

.download-card-actions-button-secondary {
background-color: #fff0;
color: #B0B0B0;
margin-right: 1px;
}

.download-card-file {
color: #B0B0B0;
}

.download-card-info {
color: #B0B0B0;
}
}

/** ANIMATION **/
Expand Down
43 changes: 43 additions & 0 deletions js/BackgroundService.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
/** MIT License
*
* Copyright (c) 2023 Dasutein
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of this software
* and associated documentation files (the "Software"), to deal in the Software without restriction,
* including without limitation the rights to use, copy, modify, merge, publish, distribute,
* sublicense, and/or sell copies of the Software, and to permit persons to whom the Software
* is furnished to do so, subject to the following conditions:
*
* See more: https://github.com/ddasutein/AutoRename/blob/master/LICENSE
*
*/

const GLOBAL_VARIABLES = {

UA_HEADER: `${navigator.userAgent} ${chrome.runtime.getManifest().name}/${chrome.runtime.getManifest().version}`

}

const Backgroundscripts = [
"/js/Settings.js",
"/js/Runtime.js",
"/lib/Moment/moment.js",
"/lib/Moment/moment-with-locales.js",
"/js/Common/Utility.js",
"/js/Common/Debugger.js",
"/js/Common/SetTimeDate.js",
"/js/Twitter/TwitterContent.js",
"/js/LINE BLOG/LineBlogContent.js",
"/js/Reddit/RedditContent.js",
"/js/DownloadManager.js",
"/js/SaveAsEventHandle.js"
]

try {
Backgroundscripts.forEach((x)=>{
importScripts(x);
});

}catch(e){
console.error(e);
}
21 changes: 21 additions & 0 deletions js/Common/Utility.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,27 @@ let Utility = {
}
break;
}
}),

SetBadgeText : ((str)=>{
if (str == 0 || str == null){
chrome.action.setBadgeText({
text: ""
});
} else if (str > 0){
chrome.action.setBadgeText({
text: str.toString()
});
}

}),

CreateNewTab : ((url)=>{
return chrome.tabs.create({
url: url
});
})



}
Loading

0 comments on commit ccbeb45

Please sign in to comment.