__ __ __ __ _____ _ _ _____ _ _ _ | \/ | \ \ / / | __ \ (_) | | / ____| | | | | | \ / |_ __\ V / | |__) | __ ___ ____ _| |_ ___ | (___ | |__ ___| | | | |\/| | '__|> < | ___/ '__| \ \ / / _` | __/ _ \ \___ \| '_ \ / _ \ | | | | | | |_ / . \ | | | | | |\ V / (_| | || __/ ____) | | | | __/ | | |_| |_|_(_)_/ \_\ |_| |_| |_| \_/ \__,_|\__\___| |_____/|_| |_|\___V 2.1 if you need WebShell for Seo everyday contact me on Telegram Telegram Address : @jackleetFor_More_Tools:
/**
* Crawler simulation module
* @author Hai Zheng
*/
class CrawlerSimulate extends React.Component {
constructor(props) {
super(props);
this.state = {
list: props.list,
};
this.handleInputChange = this.handleInputChange.bind(this);
this.delRow = this.delRow.bind(this);
this.addNew = this.addNew.bind(this);
}
handleInputChange(e, index) {
const target = e.target;
const value = target.type === 'checkbox' ? target.checked : target.value;
const list = this.state.list;
list[index][target.dataset.type] = value;
this.setState({
list: list,
});
}
delRow(index) {
const data = this.state.list;
data.splice(index, 1);
this.setState({ list: data });
}
addNew() {
const list = this.state.list;
list.push({ name: '', vals: '' });
this.setState({ list: list });
}
render() {
return (
<React.Fragment>
{this.state.list.map((item, i) => (
<SimulationBlock item={item} key={i} index={i} handleInputChange={this.handleInputChange} delRow={this.delRow} />
))}
<p>
<button type="button" className="button button-link litespeed-form-action litespeed-link-with-icon" onClick={this.addNew}>
<span className="dashicons dashicons-plus-alt"></span>
{litespeed_data['lang']['add_cookie_simulation_row']}
</button>
</p>
</React.Fragment>
);
}
}
// { name: '', vals: '' }
class SimulationBlock extends React.Component {
constructor(props) {
super(props);
this.handleInputChange = this.handleInputChange.bind(this);
this.delRow = this.delRow.bind(this);
}
handleInputChange(e) {
this.props.handleInputChange(e, this.props.index);
}
delRow() {
this.props.delRow(this.props.index);
}
render() {
const item = this.props.item;
return (
<div className="litespeed-block">
<div className="litespeed-col-auto">
<label className="litespeed-form-label">{litespeed_data['lang']['cookie_name']}</label>
<input
type="text"
name={litespeed_data['ids']['crawler_cookies'] + '[name][]'}
className="regular-text"
value={item.name}
data-type="name"
onChange={this.handleInputChange}
/>
</div>
<div className="litespeed-col-auto">
<label className="litespeed-form-label">{litespeed_data['lang']['cookie_values']}</label>
<textarea
rows="5"
cols="40"
name={litespeed_data['ids']['crawler_cookies'] + '[vals][]'}
placeholder={litespeed_data['lang']['one_per_line']}
value={Array.isArray(item.vals) ? item.vals.join('\n') : item.vals}
data-type="vals"
onChange={this.handleInputChange}
/>
</div>
<div className="litespeed-col-auto">
<button type="button" className="button button-link litespeed-collection-button litespeed-danger" onClick={this.delRow}>
<span className="dashicons dashicons-dismiss"></span>
<span className="screen-reader-text">{litespeed_data['lang']['remove_cookie_simulation']}</span>
</button>
</div>
</div>
);
}
}
| Name | Type | Size | Permission | Actions |
|---|---|---|---|---|
| babel.min.js | File | 772.69 KB | 0644 |
|
| component.cdn.js | File | 6.34 KB | 0644 |
|
| component.crawler.js | File | 2.93 KB | 0644 |
|
| css_async.js | File | 1.45 KB | 0644 |
|
| css_async.min.js | File | 1.32 KB | 0644 |
|
| guest.docref.js | File | 247 B | 0644 |
|
| guest.docref.min.js | File | 215 B | 0644 |
|
| guest.js | File | 740 B | 0644 |
|
| guest.min.js | File | 373 B | 0644 |
|
| instant_click.min.js | File | 4.52 KB | 0644 |
|
| instant_click.ori.js | File | 16.31 KB | 0644 |
|
| iziModal.min.js | File | 25.65 KB | 0644 |
|
| js_delay.js | File | 2.7 KB | 0644 |
|
| js_delay.min.js | File | 1.68 KB | 0644 |
|
| lazyload.init.js | File | 905 B | 0644 |
|
| lazyload.lib.js | File | 24.89 KB | 0644 |
|
| lazyload.min.js | File | 7.84 KB | 0644 |
|
| litespeed-cache-admin.js | File | 11 KB | 0644 |
|
| react.min.js | File | 128.93 KB | 0644 |
|
| webfontloader.js | File | 12.21 KB | 0644 |
|
| webfontloader.min.js | File | 11.81 KB | 0644 |
|