Comments (5)
That's a good point; ideally would be addressed by #11, to avoid running it through multiple parsers or risking regexps.
from django-yarr.
Could this be a preference? I prefer the opposite. But of course it should be consistent.
from django-yarr.
Sure, that sounds sensible - it would probably be best to have django consistently spit out the target="blank"
everywhere, and then have some javascript strip it out again; that way it can be a per-user and per-device option (for example, I'd prefer new tabs on my phone, but the same tab on my desktop).
from django-yarr.
I absolutely agree it should be a pref, but why use JS instead of doing the processing server-side? To what extent is Yarr supposed to function without JS?
from django-yarr.
I should have said "it would probably be easiest" rather than "best"!
At the moment Yarr is fully functional without JS, but where the JS controls the layout, options are stored in JS cookies. This seemed like an easy way to let me have different defaults on my phone to my desktop, as well as to other users.
As target="blank"
isn't a JS enhancement, I agree it would be better to do it server-side. However, I can't see an easy way to do per-user/per-device options without adding a Profile model, either giving users a UI to select and manage sets of options for different devices, or automatically creating a new profile for each new device. While that would work, it feels like overkill, at this stage at least. We can take another look when we have more server-side options to control.
Perhaps a more practical compromise would be to have a global default which controls the generated HTML, then the JS can either add or strip the target based on an option in a JS-managed cookie.
from django-yarr.
Related Issues (20)
- Media rendering
- Adaptive feed check frequency
- Load feed when added
- Duplicate post consolidation HOT 3
- Yarr's incompatibilty with Django "custom User model" HOT 3
- <style> tag content displayed in feeds HOT 1
- Feed list scrolls to the top on click HOT 1
- At least some default page working HOT 5
- Feed update clobbers changes to feed title HOT 2
- "Mark all as read" on saved items results in items with both saved and read flags HOT 3
- Mark all read doesn't always work
- unexpected keyword argument 'namedtuple_as_object' HOT 2
- error when comparing datetimes HOT 2
- Compatibility with Django 1.7 HOT 5
- Include a ready to use yarr site HOT 2
- Supported browsers? HOT 1
- Don't report CharacterEncodingOverride as a feed error
- models error HOT 1
- __init__() got an unexpected keyword argument 'mimetype'
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 django-yarr.