Git Product home page Git Product logo

prntr's Introduction

Hey there! ๐Ÿ‘ฉ๐Ÿผโ€๐Ÿ’ป

Iโ€™m a Frontend Developer from Amsterdam. Current stack is mostly React, Typescript, GraphQL, Nextjs, Tailwind/CSSinJS, state management with zustand or similar. Started off my career back in the days using tables; iframes had hardly left the building and tables were cool! Since then I worked at 3 different agencies for about 12 years and I am currently living the freelance life. ๐Ÿ€ I play basketball, I boulder, my ๐Ÿฑ's name is Silver and I currently live ๐Ÿ‘ญ in Amsterdam.

Sidenote: Some of these projects below might be old and I do not always update them regularly.

Last project: Lefebvre Sarrut / SDU

๐Ÿ‘ฉ๐Ÿผโ€๐Ÿ’ป Repositories I created or contributed to, most of them not actively maintained


๐Ÿ“ Things on my TODO list

  • Update my github repos...
  • ....

๐Ÿ‘จ๐Ÿผโ€๐Ÿ’ป Tech I like

html5 css3 javascript typescript react nextjs graphql gatsby cypress photoshop docker kubernetes npm storybook nodejs


daphne

prntr's People

Contributors

daphnesmit avatar github-actions[bot] avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

prntr's Issues

Convert to javascript please

Hello I want to add this script to my website like Printer.js

<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/prntr.cjs.min.js"></script>
prntr.cjs.js:3 Uncaught ReferenceError: process is not defined
    at prntr.cjs.js:3:5
(anonymous) @ prntr.cjs.js:3
prntr.esm.js:1 Uncaught SyntaxError: Cannot use import statement outside a module

Help me :(

`onPrintDialogClose` doesn't trigger in Firefox anymore

Hi!

The latest version doesn't trigger onPrintDialogClose in Firefox anymore.

I tried downgrading to version 2.0.1 and that solved the problem, so the regression is in one of the later versions since then.

I'm on Windows 11.

iframe remains in DOM after print/cancel

Chrome version: 97.0.4692.99
Windows version: 21H2 (19044.1466)

As per the title, the iframe is remaining in the DOM after closing the chrome print dialog. It is only removed if I unfocus the window and refocus it.

The impact of this is bigger than you would expect, as in my Vue-Router app using browser nav to go back then forward again will reopen the print dialog as soon as the component for that route loads.

Add footer

Can you add possibility to add footer? Same as addHeader. Thank you.

[Feature Request] Cancel/Print event

Hi !

Is there any possibility to get a cancel/print event ?
Maybe within the onPrintDialogClose property ?

I need to save the information that some files have been printed, i can't find any solution.

Thank your for your great work !

Regards

Library fails to detect Chrome browser

Hi

There seems to be some code in your library that wants to use the focus event for Chrome and Firefox to trigger the onPrintDialogClose callback. The problem is that Browser$1.isChrome() returns false for me in Chrome 97.0.4692.99 (Win 11), causing it to keep listening for mouseover.

image

This prevents onPrintDialogClose from getting called.

If I set a breakpoint on line 103 in your code and overwrite the event variable with the value focus using the console, then the callback gets triggered without any need to move the mouse around.

Maybe there is a better way you can test which browser is being used? Alternatively accept a config option that lets the application tell prntr which browser is running (which in my case would be easy since I'm using the bowser library). Since this is a TS library, a discriminated union of 'Chrome' | 'Edge' | 'Firefox' | ... would make for a neat API design that prevents mistakes.

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.