Skip to content

Instantly share code, notes, and snippets.

@disinfeqt
disinfeqt / NoFollow.tsx
Created July 19, 2024 03:03
Add nofollow to links in Framer
import type { ComponentType } from "react"
interface LinkProps {
rel?: string
[key: string]: any
}
export function noFollow<T extends LinkProps>(
Component: ComponentType<T>
): ComponentType<T> {
@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;
}
javascript:(function(){document.location.href='https://chart.googleapis.com/chart?chs=300x300&cht=qr&choe=UTF-8&chl='+encodeURIComponent(document.location.href);})()
// 根据当前页面生成 QR code 的 bookmarklet
// 用到了 Google Chart API: https://developers.google.com/chart/infographics/docs/qr_codes?csw=1
.js-mini-profile-stat {
font-size: 0;
}
.js-mini-profile-stat::after {
content: attr(title);
font-size: 20px;
}
javascript:(function(e,a,g,h,f,c,b,d){if(!(f=e.jQuery)||g>f.fn.jquery||h(f)){c=a.createElement("script");c.type="text/javascript";c.src="http://ajax.googleapis.com/ajax/libs/jquery/"+g+"/jquery.min.js";c.onload=c.onreadystatechange=function(){if(!b&&(!(d=this.readyState)||d=="loaded"||d=="complete")){h((f=e.jQuery).noConflict(1),b=1);f(c).remove()}};a.documentElement.childNodes[0].appendChild(c)}})(window,document,"1.7",function($,L){var playlists = [];$("body > .Menu").remove();$(".TrackList .Track:first").find('.ActionMenu.pill').trigger('click');$("body > .Menu:first").find(".scroller.vertical").find(".embedded").find("li[title=" + name + "]").trigger('click');$(".menu_click_shield").trigger('click');$("body > .Menu .scroller.vertical .embedded li").each(function(){ playlists.push($(this).attr('title').trim());});$("body > .Menu").remove();var add_playlist_index = [];$(".horizontal .ActionMenu.toolbar").append('<button class="button add_to_playlist" style="display: none;">Add To Playlist</a>');$("button.
$(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 = '';
};