tumblr

Change Tumblr audio player color with Javascript

前提是你 提交于 2019-12-25 08:03:25
问题 I'm forced to load the tumblr audio player in my theme via JavaScript because of this issue. The loading happens as follows: $(window).load(function() { setTimeout(function() { $('.audio-player').each(function(){ var audioID = $(this).parents(".audio").attr("id"); var $audioPost = $(this); var color = "000000"; //new color $.ajax({ url: '/api/read/json?id=' + audioID, dataType: 'jsonp', timeout: 50000, success: function(data){ if ($audioPost.html().indexOf("is required to") != -1) {

Random background colour picker for tumblr

喜夏-厌秋 提交于 2019-12-25 07:20:45
问题 I've got this in my code, which should select a random background colour every refresh, but i can't see what's wrong with my document.write var bgcolorlist=new Array("#ff871b", "#15efa1", "#51ddff", "#ff1b6c", "#000000") document.write('<meta name="color:Background" content='+background=bgcolorlist[Math.floor(Math.random()*bgcolorlist.length)] + '>') Cheers! 回答1: You need semicolons after each line. Additionally, why are you seeing the background color with a meta tag? Use this line instead:

How to get individual tumblr post's likes count for tumblr_client gem

二次信任 提交于 2019-12-25 03:03:27
问题 I am trying to get likes count for inidividual tumblr posts. I can only seem to get the total likes of the user and also reblog/note_count. Refer to code below. user = Authentication.where(user_id: current_user.id, provider: "tumblr").first oauth_id = user.uid oauth_access_token = user.token oauth_password = user.token_secret client = Tumblr::Client.new(:client => :httpclient) mytumblr = client.posts("testing.tumblr.com", :limit => 10) mytumblr["posts"].each do |posts| p posts["id"] p posts[

Remove Disqus comment box from main Tumblr page, but keep comment boxes for each post's page?

三世轮回 提交于 2019-12-25 02:57:44
问题 I haven't found a solution to my problem on StackOverflow or Google, so I figured I'd ask. I added Disqus to my custom theme Tumblr blog, but I want to change where the Disqus comment box/system appears. In particular, I do not want it to show up on the main Tumblr page, but I'd like it to appear on the page for each post. So, if you go to my Tumblr's main page you will see the Disqus system at the bottom - I want to remove it from there. But, I would like the Disqus system to appear on each

imagesLoaded jquery function not working with masonry

风流意气都作罢 提交于 2019-12-25 02:46:07
问题 I've been working on this for some time. I am trying to use a fadein function after all of my post content has been loaded and had the relevant masonry layout applied. Have researched this in several places, tried different versions of the imagesLoaded plugin but cannot seem to get it working. This is my basic html structure: <div id="posts"> <article class="post text clearfix"> // text post etc </article> </div> I am calling masonry and then the imagesLoaded jquery plugin. My js looks like

Bookmarklet: Click All Like Buttons On Tumblr

情到浓时终转凉″ 提交于 2019-12-25 02:14:07
问题 Similar to this Follow all users on a twitter page, I am trying to change this to click all the "like" hearts on a Tumblr page instead of the follow button: javascript:$('.button.follow-button').click() Thanks 回答1: javascript:var a = document.getElementsByTagName('a'); var b = []; for(var i=0, len = a.length; i < len; i++){ if(a[i].id.indexOf('like_button') !== -1){b.push(a[i]) } }; for(var i=0, len = b.length; i < len; i++){ b[i].onclick() }; There. What it does is gets all the a tags on the

Bookmarklet: Click All Like Buttons On Tumblr

老子叫甜甜 提交于 2019-12-25 02:12:51
问题 Similar to this Follow all users on a twitter page, I am trying to change this to click all the "like" hearts on a Tumblr page instead of the follow button: javascript:$('.button.follow-button').click() Thanks 回答1: javascript:var a = document.getElementsByTagName('a'); var b = []; for(var i=0, len = a.length; i < len; i++){ if(a[i].id.indexOf('like_button') !== -1){b.push(a[i]) } }; for(var i=0, len = b.length; i < len; i++){ b[i].onclick() }; There. What it does is gets all the a tags on the

Open Youtube and Tumblr link in app rather than browser - Unity

倖福魔咒の 提交于 2019-12-24 18:03:21
问题 I've managed to make it so when clicking specific buttons it loads up Facebook, Twitter and Instagram using fb://------ , twitter://---- and instagram://----- , but I can't seem to find one for YouTube or Tumblr. Is there any way to do this? Edit: This is my current code. (Sorry for the slow reply) // Set buttontype in editor depending on which button it is // 0 = facebook, 1 = instagram, 2 = tumblr, 3 = twitter, 4 = youtube public int buttonType; // Web urls - use this for computers or if

Open Youtube and Tumblr link in app rather than browser - Unity

这一生的挚爱 提交于 2019-12-24 18:01:47
问题 I've managed to make it so when clicking specific buttons it loads up Facebook, Twitter and Instagram using fb://------ , twitter://---- and instagram://----- , but I can't seem to find one for YouTube or Tumblr. Is there any way to do this? Edit: This is my current code. (Sorry for the slow reply) // Set buttontype in editor depending on which button it is // 0 = facebook, 1 = instagram, 2 = tumblr, 3 = twitter, 4 = youtube public int buttonType; // Web urls - use this for computers or if

Not able to get irb console working with tumblr_client gem

北慕城南 提交于 2019-12-24 15:58:07
问题 I have very little experience with APIs which is something that I'm trying to change so I'm trying to get started with the Tumblr api. I've installed the tumblr_client gem (documentation here) and am following the instructions. I've created an application on a new Tumblr account and have the necessary OAuth information (consumer_key, consumer_secret, ect.) Actually getting it to do something is proving difficult, so like a good little programmer I'm trying to get the console going to explore