Usually compile locally but to ensure that when share a document with people on a private instance, hence having unlimited compilation time it seems, then the document is fine. Also as the PDF expires quite quickly it seems but this is maybe due to the specific Overleaf instance I am using.
Usually compile locally but to ensure that when share a document with people on a private instance, hence having unlimited compilation time it seems, then the document is fine. Also as the PDF expires quite quickly it seems but this is maybe due to the specific Overleaf instance I am using.
Related to #38, #31 and [Improve_websites_thanks_to_open_source/issues/](https://codeberg.org/Benjamin_Loison/Improve_websites_thanks_to_open_source/issues){[540](https://codeberg.org/Benjamin_Loison/Improve_websites_thanks_to_open_source/issues/540),[726](https://codeberg.org/Benjamin_Loison/Improve_websites_thanks_to_open_source/issues/726),[725](https://codeberg.org/Benjamin_Loison/Improve_websites_thanks_to_open_source/issues/725),[727](https://codeberg.org/Benjamin_Loison/Improve_websites_thanks_to_open_source/issues/727)}.
Can manually at Firefox level provide notification permission?
```javascript
new Notification("To do list", { body: 'Test' });
```
```
Notification { onclick: null, onshow: null, onerror: null, onclose: null, title: "To do list", dir: "auto", lang: "", body: "Test", tag: "", icon: "" }
```
Source: https://developer.mozilla.org/en-US/docs/Web/API/Notifications_API/Using_the_Notifications_API#creating_a_notification
maybe have to be on another tab to notice it.
```javascript
Notification.requestPermission().then((result) => {
console.log(result);
});
```
```
Promise { <state>: "pending" }
The Notification permission may only be requested from inside a short running user-generated event handler.
default
```
Source: https://developer.mozilla.org/en-US/docs/Web/API/Notifications_API/Using_the_Notifications_API#getting_permission




Can manually at Firefox level provide notification permission?
Adding a listener for DOMSubtreeModified is deprecated and will be removed soon. Instead of a MutationEvent, use MutationObserver. https://developer.mozilla.org/docs/Web/API/MutationObserver
<details>
<summary>JavaScript code:</summary>
```javascript
function getElementByXpath(path) {
return document.evaluate(path, document, null, XPathResult.FIRST_ORDERED_NODE_TYPE, null).singleNodeValue;
}
var element = getElementByXpath('//span[@class="btn-recompile-label"]');
element.addEventListener('DOMSubtreeModified', myFunction);
function myFunction(e) {
console.log(element.innerHTML);
}
```
</details>
```
Adding a listener for DOMSubtreeModified is deprecated and will be removed soon. Instead of a MutationEvent, use MutationObserver. https://developer.mozilla.org/docs/Web/API/MutationObserver
```
Source: [the Stack Overflow answer 47379026](https://stackoverflow.com/a/47379026)
At random it will be fed with data from an external source (that I do not have control of).
So maybe it does match my needs, as it may be HTML nodes, not just text.
Well the mentioned answer is just about text.
> At random it will be fed with data from an external source (that I do not have control of).
So maybe it does match my needs, as it may be HTML nodes, not just text.
Well the mentioned answer is just about text.
<details>
<summary>JavaScript code:</summary>
```javascript
var element = document.getElementById('recompile');
var MutationObserver = window.MutationObserver || window.WebKitMutationObserver || window.MozMutationObserver;
var observer = new MutationObserver(myFunction);
observer.observe(element, {
childList: true
});
function myFunction() {
console.log(element.innerHTML);
}
```
</details>
does not work too.
myFunction is triggered at the beginning and at the end of the compilation but only the latter console.log gives the expected innerHTML.
<details>
<summary>JavaScript code:</summary>
```javascript
function getElementByXpath(path) {
return document.evaluate(path, document, null, XPathResult.FIRST_ORDERED_NODE_TYPE, null).singleNodeValue;
}
var element = getElementByXpath('//span[@class="btn-recompile-label"]');
var MutationObserver = window.MutationObserver || window.WebKitMutationObserver || window.MozMutationObserver;
var observer = new MutationObserver(myFunction);
observer.observe(element, {
attributes: true
});
function myFunction() {
console.log(element.innerHTML);
console.log(getElementByXpath('//span[@class="btn-recompile-label"]').innerHTML)
}
```
</details>
`myFunction` is triggered at the beginning and at the end of the compilation but only the latter `console.log` gives the expected `innerHTML`.
functiongetElementByXpath(path){returndocument.evaluate(path,document,null,XPathResult.FIRST_ORDERED_NODE_TYPE,null).singleNodeValue;}functiongetRecompileButton(){returngetElementByXpath('//span[@class="btn-recompile-label"]');}varelement=getRecompileButton();varMutationObserver=window.MutationObserver||window.WebKitMutationObserver||window.MozMutationObserver;varobserver=newMutationObserver(myFunction);observer.observe(element,{attributes:true});functiongetTimestamp(){returnnewDate().getTime();}varlastRecompileTime;functionmyFunction(){constcurrentLabel=getRecompileButton().innerHTML;console.log(newDate().toLocaleString()+': '+currentLabel);switch(currentLabel){case'Compilation en cours…':lastRecompileTime=getTimestamp();break;case'Recompiler':console.log(`Compilation took ${((getTimestamp()-lastRecompileTime)/1_000).toFixed(2)} seconds!`)break;//default:
}}
Output:
25/03/2025, 18:29:51: Compilation en cours…
25/03/2025, 18:29:56: Recompiler
Compilation took 5.20 seconds!
25/03/2025, 18:29:59: Compilation en cours…
25/03/2025, 18:30:05: Recompiler
Compilation took 5.33 seconds!
Related to [Improve_websites_thanks_to_open_source/issues/1542](https://codeberg.org/Benjamin_Loison/Improve_websites_thanks_to_open_source/issues/1542).
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Usually compile locally but to ensure that when share a document with people on a private instance, hence having unlimited compilation time it seems, then the document is fine. Also as the PDF expires quite quickly it seems but this is maybe due to the specific Overleaf instance I am using.
Related to #38, #31 and Improve_websites_thanks_to_open_source/issues/{540,726,725,727}.
Source: https://developer.mozilla.org/en-US/docs/Web/API/Notifications_API/Using_the_Notifications_API#creating_a_notification
maybe have to be on another tab to notice it.
Source: https://developer.mozilla.org/en-US/docs/Web/API/Notifications_API/Using_the_Notifications_API#getting_permission
Can manually at Firefox level provide notification permission?
DuckDuckGo search:
JavaScript code:
Source: the Stack Overflow answer 47379026
So maybe it does match my needs, as it may be HTML nodes, not just text.
Well the mentioned answer is just about text.
Run code snippet works fine.
I suspect running my Console code after
window.addEventListener('load'can be triggered.JavaScript code:
JavaScript code:
does not work either.
works fine, maybe it acts as pointer to a copy somehow.
JavaScript code:
does not work too.
No
iframeseems to blame as I get correctly the node.JavaScript code:
myFunctionis triggered at the beginning and at the end of the compilation but only the latterconsole.loggives the expectedinnerHTML.Attribute watching may help.
gives milliseconds.
Source: the Stack Overflow answer 30245911
JavaScript code:
Output:
Source: the Stack Overflow answer 15762794
Related to benjaminloison/kile/issues/24.
Related to Improve_websites_thanks_to_open_source/issues/1542.
Related to Benjamin-Loison/selenium/issues/16.