html - 查看帖子是否在 tumblr 上是私有(private)的?

标签 html css tumblr

如果帖子在 tumblr 上是私有(private)的,我想在页面上添加一个“私有(private)”图像。有什么办法可以找出来吗?

最佳答案

我在 theming guide 中找不到任何变量, 因此似乎无法使用特殊的 classid 值。

如果你可能喜欢编程,你可以(我不太了解这些东西)使用 the API它知道“state”:

Indicates the current state of the post

States are published, queued, draft and private

另一种(相当肮脏的)方法可能是使用 JavaScript 解析 URL 路径,因为私有(private)帖子以 /private/ 开头。如果存在,您可以使用 JS 将 class 值(如“private”)添加到 body 元素。

关于html - 查看帖子是否在 tumblr 上是私有(private)的?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13167315/

相关文章:

javascript - 如何检测用户没有声音并在 Html5 和 Javascript 中运行下一个音频文件

jquery - 倒数计时器的一个不错的选择 - 将 "0"放在个位数前面

javascript - 基于数字值的条件 CSS 类

html - CSS3 - 不透明度过渡不起作用

html - 如何自定义 tumblr 404 URL 未找到页面

javascript - 如何更改之前由 jQuery 创建的 div 的值

html - CSS:如何使 li 之间的 padding-right 均匀?

css - -ms-transform 在 ie8 中不起作用,而在所有其他浏览器中都起作用

javascript - 如何使用 "tumblr.js"NodeJS 模块将照片博客发布到 tumblr

python - 如何使用 python/tumblr api 从帖子中获取注释信息?