Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Converted library to vanilla javascript #9

Merged
merged 4 commits into from
Aug 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 11 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
![Tests](https://github.com/elmahio/netstack.js/actions/workflows/test.yml/badge.svg)


A simple and easy jQuery plugin for highlighting .NET stack traces
A simple and easy JavaScript library for highlighting .NET stack traces

#### Stacktrace - Language support
[![English](images/flags/US%20-%20United%20States.svg)](#) [![Danish](images/flags/DK%20-%20Denmark.svg)](#) [![German](images/flags/DE%20-%20Germany.svg)](#) [![Russian](images/flags/RU%20-%20Russian%20Federation.svg)](#) [![Chinese](images/flags/CN%20-%20China.svg)](#)
Expand All @@ -15,13 +15,19 @@ A simple and easy jQuery plugin for highlighting .NET stack traces
[Stack Trace Formatter - Online pretty print of .NET stack traces](https://elmah.io/tools/stack-trace-formatter/)

#### Initialization
Using a string that represents a CSS selector:
```javascript
$('.stacktrace').netStack();
const stack = new netStack('.stacktrace');
```
Passing an HTMLElement object:
```javascript
const stackElement = document.querySelector('.stacktrace');
const stack = new netStack(stackElement);
```

#### Default values for classes
```javascript
$('.stacktrace').netStack({
const stack = new netStack('.stacktrace', {
frame: 'st-frame',
type: 'st-type',
method: 'st-method',
Expand All @@ -38,7 +44,7 @@ $('.stacktrace').netStack({
Default: false.
Pretty prints your stacktrace.
```javascript
$('.stacktrace').netStack({
const stack = new netStack('.stacktrace', {
prettyprint: true
});
```
Expand All @@ -58,4 +64,4 @@ pre, code {background-color:#333; color: #ffffff;}
---
### Acknowledgments

* [IgoR-NiK](https://github.com/IgoR-NiK)
* [IgoR-NiK](https://github.com/IgoR-NiK)
Loading
Loading