Answer the question
In order to leave comments, you need to log in
How to programmatically delete cookies from all browsers?
The goal is this: when the program starts, the cookies of all browsers are deleted without displaying any messages or questions to the user. It is highly desirable that only the cookies of a given site be deleted, but if this is not possible, all cookies can be deleted. The main thing is that cookies of all browsers are deleted and without user intervention.
If such programs already exist, please share the link. If there are none, then tell me how to write such a program in C ++ preferably (I know him the most)
Answer the question
In order to leave comments, you need to log in
UPD:
const add_time = '2019-02-05 11:08:18';
add_time.replace(/-/g, '/').slice(2, -3); //19/02/05 11:08
If you do not want to connect third-party libraries, you can use the standard JavaScript features for working with dates and regular expressions to format them in the desired format. It might look something like this:
let date = new Date('2019-02-05 11:08:18');
let regexp = /(\d{2})\/(\d{2})\/(\d{2})/;
let options = {year: "2-digit", month: "2-digit", day: "2-digit"};
let dateOutput = `${date.toLocaleDateString('en-US', options).replace(regexp, '$3/$1/$2')} ${date.toLocaleTimeString('en-US').slice(0, -6)}`
// "19/02/05 11:08"
In general, deleting cookies for a particular browser is not a problem - for this it is enough to clean certain daddies. For example, all Horm cookies are stored in the sqlite3 base ~/Library/Application Support/Google/Chrome/Default/Cookies.
The problem is different - there can be many browsers, different manufacturers. Nobody bothers me to download two different portable assemblies of the tor browser, for example. Or not two, but twenty-two, and push them into different back streets. And now what, scan the entire disk?
Be specific about what you are trying to achieve?
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question