Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 2 years ago.
Improve this question
I've this type of URL:
https://example.com/page#param1|param2
How can I get param1 and param2 ?
Thanks.
Those are part of the hash if you are getting them from the current url.
_hash = window.location.hash.split("|")
console.log(_hash)
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 2 years ago.
Improve this question
Hi I have a general question is it okay to write JavaScript code in angular (in my case for dom manipulation)
Here is an example of what i would use.
Thanks in Advance.
document.querySelectorAll('div.links a').forEach(function(item) {
const tag = window.location.href.indexOf('content') > -1 ? 'hello' : 'hai';
const href = `${item.getAttribute('href')}${brand}`;
item.setAttribute('href', href);
});
You should access to dom elements using angular properties such as ElementRef/ViewChild like it says on the answer here:
Access to dom elements
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 4 years ago.
Improve this question
I came across this java script code and I don't know how I encode it. Here is a part of it:
var _0x6ah4=['a22uo1w=','a2VlcC1h2ZQ==','YMA0aG9y8XVlML==','Z3cCwgZGVmHBbG0ZQ==','Qk1OQ04=','enNHYAM=','P0ASTmI=','RkVPOE9=','Y2AQUEc=']
Can somebody tell me how to convert this into readable code?
var _0x6ah4=['a22uo1w=','a2VlcC1h2ZQ==','YMA0aG9y8XVlML==','Z3cCwgZGVmHBbG0ZQ==','Qk1OQ04=','enNHYAM=','P0ASTmI=','RkVPOE9=','Y2AQUEc=']
Its simple.
variable name _0x6ah4 ,
its an array containing 9 elements.
You can fetch the data using foreach, if you want.
var _0x6ah4=['a22uo1w=','a2VlcC1h2ZQ==','YMA0aG9y8XVlML==','Z3cCwgZGVmHBbG0ZQ==','Qk1OQ04=','enNHYAM=','P0ASTmI=','RkVPOE9=','Y2AQUEc='];
for (var line=1; line<_0x6ah4.length; line++) {
console.log(_0x6ah4[line]);
//if you need to decode , do it here
}
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 6 years ago.
Improve this question
Is it possible to reverse an array using higher-order functions. I've searched google and can't find anything on this.
Array.prototype.reverse()
var a = [1,2,3];
console.log(a.reverse());
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 7 years ago.
Improve this question
The below code is full of string. I want to select cbUserURLs array variable.
var someurl =new Array('a','b');
var cbUserURLs =new Array('url1','url2',...);
.. //some code
What is the regular expression should I use here?
You just need use cbUserURLs.*\); if what you want is