Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion manifest.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "Paper Memory",
"version": "1.0.2",
"version": "1.1.0",
"manifest_version": 3,
"description": "Automatically record papers and their codes from Arxiv, OpenReview & more! Organize your library with tags, links and quick notes.",
"homepage_url": "https://papermemory.org",
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "papermemory",
"version": "1.0.2",
"version": "1.1.0",
"description": "N/A",
"main": "gulpfile.js",
"moduleDirectories": [
Expand Down
41 changes: 21 additions & 20 deletions src/content_scripts/content_script.css
Original file line number Diff line number Diff line change
Expand Up @@ -41,25 +41,26 @@
}

#feedback-notif {
padding: 1em;
z-index: 1000;
font-size: 14px;
font-family: Mukta, Arial, sans-serif, Helvetica;
color: #b31b1b;
height: 36px;
background: white;
opacity: 1;
position: fixed;
border-radius: 4px;
border: 1px solid;
padding: 0px;
bottom: 48px;
right: -200px;
display: flex;
align-items: center;
justify-content: center;
text-align: center;
color: white;
background: #b31b1b;
border-radius: 4px;
position: fixed;
font-size: 14px;
bottom: 64px;
right: -200px;
opacity: 0;
padding: 1rem;
-webkit-box-shadow: 14px 30px 122px -30px rgba(0, 0, 0, 0.75);
-moz-box-shadow: 14px 30px 122px -30px rgba(0, 0, 0, 0.75);
box-shadow: 14px 30px 122px -30px rgba(0, 0, 0, 0.75);
font-family: Mukta, Arial, sans-serif, Helvetica;
z-index: 1000;
box-shadow: #b31b1b 4px 4px 0px 0px;
-moz-box-shadow: #b31b1b 4px 4px 0px 0px;
-webkit-box-shadow: #b31b1b 4px 4px 0px 0px;
}

#feedback-pwc {
Expand Down Expand Up @@ -98,22 +99,22 @@
justify-content: center;
align-items: center;
padding: 0px 16px;
min-height: 60px;
}

#notif-cancel {
color: #b31b1b;
display: flex;
justify-content: center;
align-items: center;
min-height: 60px;
padding: 0px 16px;
cursor: pointer;
border-left: 1px solid #7f2828;
border-left: 1px solid #ffe9e9;
border-top-right-radius: 4px;
border-bottom-right-radius: 4px;
}
#notif-cancel:hover {
background: #7f2828;

.notif-small {
width: 36px;
}

/*
Expand Down
20 changes: 11 additions & 9 deletions src/content_scripts/content_script.js
Original file line number Diff line number Diff line change
Expand Up @@ -136,14 +136,14 @@ const svg = (name) => {

case "notif-cancel":
return /*html*/ `<svg
width="25"
height="25"
width="20"
height="20"
viewBox="0 0 24 24"
stroke-width="1"
fill="none"
stroke-linecap="round"
stroke-linejoin="round"
stroke="white"
stroke="#b31b1b"
>
<path stroke="none" d="M0 0h24v24H0z" fill="none" />
<line x1="4" y1="7" x2="20" y2="7" />
Expand All @@ -163,9 +163,9 @@ const injectNotifCSS = () => {
el.type = "text/css";
el.innerText = `
.pm-notif-loader {
width: 24px;
height: 24px;
border: 2px solid #FFF;
width: 16px;
height: 16px;
border: 1px solid #b31b1b;
border-bottom-color: transparent;
border-radius: 50%;
display: inline-block;
Expand Down Expand Up @@ -416,11 +416,12 @@ const hideNotif = () =>
const end = ({ dontWait = false } = {}) => {
global.notif.prevent = false;
global.notif.isLoading = false;
querySelector("#feedback-notif")?.classList.remove("notif-small");
setTimeout(resolve, dontWait ? 0 : 150);
};

if (!global.notif.element) {
warn("[PM][hideNotif] Notif element not found");
warn("[hideNotif] Notif element not found");
end({ dontWait: true });
return;
}
Expand All @@ -437,7 +438,7 @@ const hideNotif = () =>

const setNotifContent = (text) => {
if (!global.notif.element) {
warn("[PM][setNotifContent] Notif element not found");
warn("[setNotifContent] Notif element not found");
return;
}
global.notif.element.html(text);
Expand Down Expand Up @@ -495,10 +496,11 @@ const feedback = async ({
<div>${text}</div>
</div>
<div title="Cancel" id="notif-cancel">
<div>${svg("notif-cancel")}</div>
${svg("notif-cancel")}
</div>`;
} else if (loading) {
global.notif.isLoading = true;
querySelector("#feedback-notif")?.classList.add("notif-small");
content = /*html*/ `<div id="notif-text"><span class="pm-notif-loader"></span></div>`;
} else {
content = /*html*/ ` <div id="notif-text">
Expand Down
22 changes: 22 additions & 0 deletions src/popup/html/modals/whatsnew.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,28 @@
<div id="modal-whatsnew-content" class="popup-modal-content" style="display: none">
<h3 style="margin-bottom: 0px">What's new</h3>
<ul>
<li>
<strong>Current: </strong>
<a href="https://github.com/vict0rsch/PaperMemory/releases/tag/1.1.0"
>1.1.0</a
>
<em>(2025-07-12)</em>
<ul>
<li>[new source] Add AIP as a paper source</li>
<li>[new source] Add Cell as a paper source</li>
<li>
[feature] New loading notification when PaperMemory is working in
the background to fetch a paper's data
</li>
<li>[feature] New notification style, more discrete</li>
<li>
[dev] Make Abstracts the defaults not PDFs (for new users only, go
to your settings otherwise)
</li>
<li>[dev] Fix a keyboard shortcut bug</li>
<li>[dev] Fix a post-click feedback bug</li>
</ul>
</li>
<li>
<strong>Current: </strong>
<a href="https://github.com/vict0rsch/PaperMemory/releases/tag/1.0.2"
Expand Down
1 change: 1 addition & 0 deletions src/popup/js/handlers.js
Original file line number Diff line number Diff line change
Expand Up @@ -393,6 +393,7 @@ const handlePopupKeydown = async (e) => {
const isCtrlOrMeta = e.ctrlKey || e.metaKey;
const isEnter = key === "Enter" && !isCtrlOrMeta;
const isCmdEnter = key === "Enter" && isCtrlOrMeta;
if (isCtrlOrMeta && !isCmdEnter) return;
if (
[
"Backspace",
Expand Down
2 changes: 1 addition & 1 deletion src/popup/min/popup.min.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/popup/min/popup.min.js

Large diffs are not rendered by default.

11 changes: 10 additions & 1 deletion src/shared/js/utils/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,6 @@ global.prefsCheckNames = [
"checkAr5iv",
"checkHuggingface",
"checkOfficialRepos",
"checkPreferPdf",
"checkPdfOnly",
"checkNoAuto",
"checkMdYearVenue",
Expand All @@ -140,6 +139,7 @@ global.prefsCheckDefaultFalse = [
"checkPdfOnly",
"checkNoAuto",
"checkMdYearVenue",
"checkPreferPdf",
];
/**
* All keys to retrieve from the menu, the checkboxes + the custom pdf function
Expand Down Expand Up @@ -355,6 +355,15 @@ global.knownPaperPages = {
],
name: "Wiley",
},
aip: {
patterns: [
(url) =>
url.match(
/pubs.aip.org\/aip\/.+\/(article|article-abstract|article-split)\//g
) || url.match(/watermark.silverchair.com\/.+\.pdf/g),
],
name: "AIP (American Institute of Physics)",
},
};

global.overrideORConfs = {
Expand Down
15 changes: 14 additions & 1 deletion src/shared/js/utils/paper.js
Original file line number Diff line number Diff line change
Expand Up @@ -200,6 +200,10 @@ const paperToAbs = (paper) => {
abs = `https://www.cell.com/${journal}/fulltext/${pii}`;
break;

case "aip":
abs = `https://doi.org/${paper.doi}`;
break;

default:
abs = "https://xkcd.com/1969/";
break;
Expand Down Expand Up @@ -320,9 +324,13 @@ const paperToPDF = (paper) => {

case "website":
break;

case "cell":
break;

case "aip":
break;

default:
pdf = "https://xkcd.com/1969/";
break;
Expand Down Expand Up @@ -685,7 +693,7 @@ const addOrUpdatePaper = async ({
}
log("paper: ", paper);

notifText = "Added to your Memory";
notifText = "Saved ✓";
if (pwc.codeLink) {
notifText +=
"<br/><div id='feedback-pwc'>(+ repo from PapersWithCode) </div>";
Expand Down Expand Up @@ -967,6 +975,11 @@ const parseIdFromUrl = async (url, tab = null) => {
"cell",
miniHash(url.split("cell.com/")[1])
);
} else if (is.aip) {
const { aipId, doi } = parseAIPIdOrDOI(url);
idForUrl = doi
? findPaperForProperty(papers, "aip", doi, "doi")
: findPaperForProperty(papers, "aip", miniHash(aipId));
} else if (is.localFile) {
idForUrl = is.localFile;
} else if (is.parsedWebsite) {
Expand Down
Loading