Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- jQuery(document).ready(() => {
- if(typeof profileFields !== 'undefined'){
- profileFields.forEach(obj => {
- if(obj.id === '1'){
- const songIn = obj.content.indexOf('/track/');
- const song = (songIn != -1) && obj.content.substring(songIn);
- if(!!song){
- $('.spoti-song').append('<iframe src="https://open.spotify.com/embed' + song + '" width="300" height="380" frameborder="0" allowtransparency="true" allow="encrypted-media"></iframe>');
- }else{
- $('.spoti-song').append('<iframe src="https://open.spotify.com/embed/track/2zYzyRzz6pRmhPzyfMEC8s" width="300" height="380" frameborder="0" allowtransparency="true" allow="encrypted-media"></iframe>');
- };
- };
- });
- };
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement