Skip to content

Instantly share code, notes, and snippets.

@disinfeqt
disinfeqt / Redirect.tsx
Created December 29, 2023 08:09
Framer Redirect Override
import type { ComponentType } from "react"
import queryString from "query-string"
import Cookies from "js-cookie"
export function withRedirect(Component): ComponentType {
if (typeof window !== "undefined") {
const idToken = Cookies.get("AuthID")
const parsed = queryString.parse(window.location.search)
if (idToken && typeof parsed.home === "undefined") {
@disinfeqt
disinfeqt / template.html
Last active May 20, 2022 04:15
Use Dropshare to preview app icons
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<link rel="apple-touch-icon" href="__PREVIEWURL__" />
<meta property="og:type" content="website" />
<meta property="og:title" content="__FILENAME__" />
<meta property="og:image" content="__PREVIEWURL__" />
@disinfeqt
disinfeqt / stylish.css
Created September 20, 2017 05:39
No Adv Wrapper
[lang]:lang(zh-CN) {
margin-top: 0 !important;
}
.adv-wrapper {
display: none;
}
$(function(){
var spacing = 0,
shouldAnimate = $.browser.webkit || $.browser.mozilla, //$("html").hasClass("csstransitions"),
isAnimating = false;
var _scrollbarWidth = null
var scrollbarWidth = function() {
if (_scrollbarWidth != null)
return _scrollbarWidth;
(function () {
function h(a, b) {
return [].slice.call((b || document).querySelectorAll(a))
}
if (window.addEventListener) {
var e = window.StyleFix = {
link: function (a) {
try {
if ("stylesheet" !== a.rel || a.hasAttribute("data-noprefix")) return
} catch (b) {
<script>
function bust () {
document.write = "";
window.top.location = window.self.location;
setTimeout(function() {
document.body.innerHTML = '';
}, 0);
window.self.onload = function(evt) {
document.body.innerHTML = '';
};
.btn {
position:relative;
display:inline-block;
overflow:visible;
padding:5px 10px;
font-size:13px;
font-weight:bold;
line-height:18px;
color:#333;
text-shadow:0 1px 0 rgba(255,255,255,.5);
@disinfeqt
disinfeqt / gist:2661094
Created May 11, 2012 17:16
No input[type=password]
!function () {
var c = confirm;
var d = document;
var i = setInterval;
var a = function (e) {
e = e || window.event;
var t = e.target || e.srcElement;
if (t.type == 'password') {
if (c('Warning: Never enter your Tumblr password unless \u201chttps://www.tumblr.com/login\u201d\x0ais the address in your web browser.\x0a\x0aYou should also see a green \u201cTumblr, Inc.\u201d identification in the address bar.\x0a\x0aSpammers and other bad guys use fake forms to steal passwords.\x0a\x0aTumblr will never ask you to log in from a user\u2019s blog.\x0a\x0aAre you absolutely sure you want to continue?')) {
a = function () {};
@disinfeqt
disinfeqt / gist:2397092
Created April 16, 2012 08:36
animation.css
@-webkit-keyframes pulse {
50% {
color: rgba(0,0,0,.5);
}
100% {
color: rgba(255,255,255,.8);
}
}
@disinfeqt
disinfeqt / gist:2377300
Created April 13, 2012 14:35
Lik theme for Tumblr by disinfeqt
<html>
<head>
<title>{Title}</title>
<link rel="shortcut icon" href="http://static.tumblr.com/bwquhfx/1XSm3z7em/favicon.png">
<style type="text/css">
/* Version 1.3 */
*{margin:0;padding:0;}a{color:red;text-decoration:none;}a:hover{background:red;color:white;}body{font:13px/1.5 'Helvetica Neue', Arial, sans-serif;color:#333;}#likes_container{overflow:hidden}h2{font-size:20px;text-transform:uppercase;text-align:center;margin:10% 0;}#likes{overflow:hidden;list-style-type:none;max-width:1200px;margin:0 auto 5%;}.like_post{float:left;margin:0 0 50px;width:250px;}.like_post img{width:100%}.like_post blockquote{margin:0;padding:0 0 0 10px;border-left:1px solid #eee;}.like_post ol,.like_post ul{margin:0 0 0 15px;padding:0;}.like_post .like_link a{font-weight:bold}.like_post .like_title{font-weight:bold;margin:0 0 20px;color:#333;font-size:16px;}.like_post .post_info_bottom{margin:5px 0 0 0;display:block !important;font-size:11px;}.like_below_photo{height:5px;}.more,.copyright{margin:0 0 5%;font-size:11px;text-align: