Giter Club home page Giter Club logo

history-extension's People

Contributors

themapsmith avatar

Watchers

 avatar

history-extension's Issues

Date off-by-one

there seems to be an off-by-one error on the date. I pick a day, but I get the history entries for the day before

Add more details to modal homepage

the home page of the extension just says "Custom History" - can you add a larger version of the icon, a more detailed title, and a short description of how it works? Include the fact that no information is shared, and this extension just reads your local data .

Persistent Modal

This is pretty good! It lists all the pages for a given date. now can you have the popup more like a modal that stays persistent until hitting a close or X button?

New "Popup" Version

I apologize for the oversight (in #1). You're right, Chrome does not allow content scripts to run on internal pages like 'chrome://history/' directly. However, you can create a custom history page that replicates the functionality you need and modify it according to your requirements.

Here's a new approach:

Create a manifest.json file for your extension:

{
  "manifest_version": 2,
  "name": "Custom History Enhancements",
  "version": "1.0",
  "description": "Improves the behavior of Chrome's History tab",
  "permissions": ["tabs", "history"],
  "browser_action": {
    "default_icon": "icon.png",
    "default_popup": "popup.html"
  },
  "icons": {
    "48": "icon.png"
  }
}

Add an appropriate icon (icon.png) to your extension's folder.

icon

Create a popup.html file for the browser action popup:

<!DOCTYPE html>
<html>
<head>
  <link rel="stylesheet" href="style.css">
</head>
<body>
  <h1>Custom History</h1>
  <input type="date" id="custom-date-picker">
  <div id="custom-history-list"></div>
  <script src="popup.js"></script>
</body>
</html>

popup.js

const datePicker = document.getElementById('custom-date-picker');
const historyList = document.getElementById('custom-history-list');

datePicker.addEventListener('change', (event) => {
  const selectedDate = event.target.value;
  filterHistoryEntriesByDate(selectedDate);
});

function filterHistoryEntriesByDate(selectedDate) {
  chrome.history.search({
    text: '',
    startTime: new Date(selectedDate).getTime(),
    endTime: new Date(selectedDate).getTime() + 86400000,
    maxResults: 1000
  }, (results) => {
    historyList.innerHTML = '';

    for (const entry of results) {
      const entryElement = document.createElement('div');
      entryElement.classList.add('entry');

      const entryTitle = document.createElement('a');
      entryTitle.href = entry.url;
      entryTitle.target = '_blank';
      entryTitle.textContent = entry.title || entry.url;
      entryElement.appendChild(entryTitle);

      historyList.appendChild(entryElement);
    }
  });
}

style.css

body {
  width: 300px;
  font-family: Arial, sans-serif;
}

h1 {
  font-size: 20px;
  margin-bottom: 10px;
}

.entry {
  margin-bottom: 4px;
}

Add visit time to listing

in the listing, can you also include the time the page was accessed next to the page title and link?

Update Readme

Following #8

Here is the current readme. Please make any adjustments as needed.

Also, please make a changelog section that lists the recent updates made to the app.

Please format your response as Markdown for easy copying

add favicon next to title

wonderful! this is all working great. can you please add the favicon between the visit time and the page title?

Add Readme

write a detailed readme for this project. include information like:

  1. Written by ChatGPT
  2. Include Contributing guides
  3. Include encouragement to submit issues for bugs and feature requests
  4. Mention me - TheMapSmith (cartographer) with a brief bio and link to https://mastodon.social/@themapsmith

Spec & Getting Started

๐Ÿ‘จ

Chrome's history tab (chrome://history) is a useful way to browse your web history, but it has a couple of drawbacks. I'd like to see if I can add some functionality to that tab with a local development extension.

  1. Don't scroll when the page loads more entries. When scrolling through the history, if you open a page in a new tab, sometimes it will automatically append it to the page, causing it to scroll and making me lose my place. I want to make the extension stop this behavior and only include new history entries on refresh.
  2. Date picker. I want to be able to jump to a certain date in the history.

Start and End Time Display at Top

I'd like to add a small new feature. At the top of the page, I'd like to list as a small horizontal table (with no borders) the earliest time and the latest time for the given day

time not sorted correctly - time zones?

i have an issue where the sites I visited at the very end of the day (8pm to 10pm) are listed at the bottom, followed by the morning and afternoon sites I visited (8am to 4pm)

Revise Time Treatment

I'd like us to adjust how we're handing time in this application.

  1. Date Picker Method:

Convert 11:59 pm and 12:01 am local time of the selected date to UTC eopch ms value
Search for all history entries between these timestamps

  1. History entry time display
    Keep the source UTC epoch ms data as-is
    Sort them descending
    When displaying the time, convert to local locale time

Earliest and Latest Time Switched

For some reason, perhaps UTC time conversions, the earliest and latest times are switched. for example, Mondays shows:
Earliest Time: 08:17 PM Latest Time: 08:01 AM

Limit Duplicated Entries

Currently, there are many entries like this repeated on the listing page, where the same page title shows up multiple times. Sometimes it's at the same minute like this:

01:12 PM - Invoicing - Google Sheets
01:12 PM - Invoicing - Google Sheets
01:12 PM - Invoicing - Google Sheets
01:12 PM - Invoicing - Google Sheets
01:12 PM - Invoicing - Google Sheets
01:12 PM - Invoicing - Google Sheets
01:12 PM - Invoicing - Google Sheets
01:12 PM - Invoicing - Google Sheets
01:12 PM - Invoicing - Google Sheets
01:12 PM - Invoicing - Google Sheets
01:12 PM - Invoicing - Google Sheets

and sometimes it's across minutes like this

01:47 PM - QB to Invoicing - Google Sheets
01:42 PM - QB to Invoicing - Google Sheets
01:42 PM - QB to Invoicing - Google Sheets
01:33 PM - QB to Invoicing - Google Sheets
01:33 PM - QB to Invoicing - Google Sheets
01:31 PM - QB to Invoicing - Google Sheets

I'd like to limit these duplicated entries in the list

refactor large filterHistoryEntriesByDate()

Here is the current codebase. Describe (without writing code) how you might split this large function up into several smaller, atomic, modular functions for easier updating in the future

Create Icon with Dalle

this needs an icon. using language compatible with DALL-E, please write a prompt describing what you think the icon should look like.

Linger Time?

can other attributes be shown, such as how long the visit to the page was?

Date Sorting Issue

The sorting of the time isn't by AM or PM, it's by numerical, so 9:16 PM shows up next to an entry for 8:45 AM. Can you have the sorting of the entries be by MS and the display be of locale time?

List of Enhancements

Now that all the features I've thought of have been implemented, I'm wondering what your thoughts are on improving the extension. Please list at least 5 additional features or changes you'd recommend

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.