Comments (2)
Done, but it's goofy. The only way to log out seems to be to open the logout url on spotify's website, so clicking the logout button annoyingly opens a new tab. The alternative is to always face the user with a confirmation page every time they go through authentication with Spotify, which provides a "Not You?" link, but that's even more annoying.
I'd like to close the new tab automatically pretty immediately, but I haven't found a way to do it programmatically without interrupting the logout process.
from exportify.
Okay, I've worked it out. The issue is that when you make a popup window (or open a new tab) you can't control whether it has focus or not from the script. That's controlled by browser settings and whether the user was ctrl+clicking a link and whatnot. And once a different window has focus, the script from the previous window stops running and can't get focus back. This is to keep webpages from stealing back focus randomly and running in the background, which would be a nightmare for users. (Webpages can still throw alert()
s to steal focus, but the user has to click "okay" before anything can advance.) So all my setTimeout()
calls to .close()
the new window weren't getting executed at all.
Solution: Load the page not in a new window but in an iframe
, so the current script maintains control. Make the iframe
invisible, because Spotify's homepage isn't interesting and can't be displayed through the frame anyway due to some security thing. Wait a second for the call to go through, then redirect to the homepage. User never has to leave the current tab and doesn't see the mess.
from exportify.
Related Issues (20)
- Failed on entire Spotify created playlist HOT 1
- Issue Exporting a Playlist HOT 2
- Couldn't export HOT 2
- Exportify Fails to Export Spotify Playlist containing Local Files HOT 2
- Couldn't export <Playlist> Encountered TypeError: Cannot read properties of null (reading 'id') HOT 2
- Encountered TypeError: Cannot read properties of null (reading 'artists'). HOT 2
- add gear / config back on exportify.net? HOT 2
- Something about null id HOT 1
- Error HOT 1
- Error log should include the Track ID along with null error HOT 1
- Why there are two CSV formats? HOT 2
- `TypeError: artist is null` when exporting playlist with podcasts HOT 1
- Error: 'float' object has no attribute 'split' when plotting Artist Bar Chart HOT 3
- Just reporting HOT 2
- Error in Cell 16 (Release Dates) HOT 3
- Error in "fit that gamma to the time-reversed data." HOT 4
- Error in "Musical Features" HOT 2
- Error in "Discrete Music Features HOT 1
- Error in "Discrete Music Features" HOT 3
- Couldn't export CALDAS V. Encountered TypeError: Cannot read properties of null (reading 'id'). HOT 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 exportify.