Hello from Gist!
Hello from IDEAS.md
Markdown ↔ HTML view
Confirmation for certain actions
var Col = require('react-bootstrap/lib/Col') | |
var PageHeader = require('react-bootstrap/lib/PageHeader') | |
var React = require('react') | |
var Row = require('react-bootstrap/lib/Row') | |
var {connect} = require('react-redux') | |
var {reduxForm} = require('redux-form') | |
var DateInput = require('./DateInput') | |
var FormField = require('./FormField') | |
var LoadingButton = require('./LoadingButton') |
entities = $('#react-root')._reactRootContainer._internalRoot?.current?.memoizedState?.element?.props?.children?.props?.store?.getState()?.entities?.users?.entities | |
users = {} | |
for (let user of Object.values(entities)) { | |
users[user.screen_name] = user | |
} |
/* Hide... */ | |
/* Views on list tweets */ | |
[data-testid="tweet"][tabindex="0"] div[id^=id__][role=group] > div:nth-child(4):nth-last-child(2), | |
/* Views on focused tweet */ | |
[data-testid="tweet"][tabindex="-1"] div[dir] + div[aria-hidden="true"]:nth-child(2):nth-last-child(2), | |
[data-testid="tweet"][tabindex="-1"] div[dir] + div[aria-hidden="true"]:nth-child(2):nth-last-child(2) + div[dir]:last-child, | |
/* Bookmark button on focused tweet */ | |
[data-testid="tweet"][tabindex="-1"] div[id^=id__][role=group] > div:nth-child(4):nth-last-child(2), | |
/* Share button on all tweets */ | |
div[id^=id__][role=group] > div:nth-child(5):last-child, |
void function() { 'use strict'; | |
var cx = (staticClasses, conditionalClasses) => { | |
var classNames = [] | |
if (typeof conditionalClasses == 'undefined') { | |
conditionalClasses = staticClasses | |
} | |
else { | |
classNames.push(staticClasses) | |
} |
var CommentList = React.createClass({ | |
render() { | |
return <div className="commentList"> | |
{this.props.data.map(comment => <Comment author={comment.author}> | |
{comment.text} | |
</Comment>)} | |
</div> | |
} | |
}) |
var baseCharCode = 'A'.charCodeAt(0) - 1 // Index is 1-based in Excel Interop | |
function excelColIndex(colName) { | |
var index = 0 | |
for (var i = 0, pow = colName.length - 1; i < colName.length; i++, pow--) { | |
index += Math.pow(26, pow) * (colName.charCodeAt(i) - baseCharCode) | |
} | |
return index | |
} |
[].forEach.call(document.querySelectorAll('.timeline-comment-wrapper'), comment => { | |
if (!comment.querySelector('.timeline-comment-label')) { | |
comment.style.display = 'none' | |
} | |
}) |
require('array.prototype.fill') | |
var React = require('react') | |
var EmailList = require('./EmailList') | |
var App = React.createClass({ | |
render() { | |
return <div className="App"> | |
<EmailList quantity={5}/> | |
</div> |
import React, { Component } from 'react'; | |
import { createStore, combineReducers, applyMiddleware, bindActionCreators } from 'redux'; | |
import { provide, connect } from 'react-redux'; | |
import thunk from 'redux-thunk'; | |
const AVAILABLE_SUBREDDITS = ['apple', 'pics']; | |
// ------------ | |
// reducers | |
// ------------ |