Last active
December 15, 2021 03:46
-
-
Save zouchao/6a9fc7c250e60de63066d7c3d2370112 to your computer and use it in GitHub Desktop.
获取 Grafana 日志中的某个 Key
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
content = [] | |
$('.css-jtwxy5-logs-rows').html().replace(/post_id[^\:]*:"(\w+)"/g, function($0, $1) { | |
content.push($1); | |
return $0; | |
}) | |
// 删除某个元素 | |
Array.prototype.remove = function(val) { | |
var index = this.indexOf(val); | |
if (index > -1) { | |
this.splice(index, 1); | |
} | |
return this | |
}; | |
// 去重 | |
Array.prototype.uniq = function() { | |
return Array.from(new Set(this)) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment