Comments (8)
I just assembled datasette-external-links-new-tabs which I believe will resolve this issue. I'll plan to include it in the next release of Datasette on Sandstorm.
from datasette-sandstorm.
I kinda think this might make sense to propose upstream because it is potentially destructive to click off the app inadvertently, so I've proposed it there first. We can make a package-specific patch if it's not wanted.
from datasette-sandstorm.
Simon pointed out (in addition to his preference against target blank) that Datasette also displays URLs in tables, so I should probably look to implement a plugin to do this more generally in Datasette.
from datasette-sandstorm.
(Fwiw, I tend to agree that in general target=_blank
is not what you should do -- but in the case of sandstorm it's needed for external links to even do anything, so...)
from datasette-sandstorm.
hm, that looks like it's actually general enough that we could even package it up as just something you can shove into apps to fix this issue in general, rather than having to patch it up on a case by case basis...
from datasette-sandstorm.
Arguably, yeah, though I think it really depends on the app whether it's the most efficient solution. <base target="_blank">
can also be a nice solution sometimes too. I personally dislike the concept of adding JS just to modify all the hyperlink tags on a page because it feels conceptually ugly/inefficient, though I'm sure compared to modern web apps it's practically zero cost.
from datasette-sandstorm.
Actually, I think at minimum I should go ahead and add it to the Docs, because we already provide the base tag example somewhere, and this would be good too.
from datasette-sandstorm.
Closing because I've pushed out Datasette 0.63 with this plugin included.
from datasette-sandstorm.
Related Issues (1)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from datasette-sandstorm.