Greasy Fork

CSRF Grabber

A library for getting the current csrf token for POSTs on Kickass Torrents.

此脚本不应直接安装。它是供其他脚本使用的外部库,要使用该库请加入元指令 // @require https://update.greasyfork.icu/scripts/19500/248917/CSRF%20Grabber.js

/*
 *  name         CSRF Grabber
 *  namespace    pxgamer
 *  version      0.2
 *  description  A library for getting the current csrf token for POSTs on Kickass Torrents.
 *  author       pxgamer
 */

function csrf() {
    'use strict';

    return $('form input[name="csrf_token"]').val();
}