Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
PIM Messagelib
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
1
Issues
1
List
Boards
Labels
Service Desk
Milestones
Merge Requests
2
Merge Requests
2
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
PIM
PIM Messagelib
Commits
2bbe014b
Commit
2bbe014b
authored
Mar 18, 2016
by
Laurent Montel
😁
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Move script here
parent
1daa3c39
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
69 additions
and
0 deletions
+69
-0
messageviewer/src/viewer/webengine/mailwebengineaccesskeyutils.cpp
...ewer/src/viewer/webengine/mailwebengineaccesskeyutils.cpp
+38
-0
messageviewer/src/viewer/webengine/mailwebengineaccesskeyutils.h
...viewer/src/viewer/webengine/mailwebengineaccesskeyutils.h
+31
-0
No files found.
messageviewer/src/viewer/webengine/mailwebengineaccesskeyutils.cpp
0 → 100644
View file @
2bbe014b
/*
Copyright (c) 2016 Montel Laurent <montel@kde.org>
This program is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License, version 2, as
published by the Free Software Foundation.
This program is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
You should have received a copy of the GNU General Public License along
with this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#include "mailwebengineaccesskeyutils.h"
QString
MessageViewer
::
MailWebEngineAccessKeyUtils
::
script
()
{
const
QString
script
=
QString
::
fromLatin1
(
"(function() {"
"var out = [];"
"var matches = document.querySelectorAll(
\"
a[href], area,button:not([disabled]), input:not([disabled]):not([hidden]),label[for],legend,select:not([disabled]),textarea:not([disabled])
\"
);"
"for (var i = 0; i < matches.length; ++i) {"
" var r = matches[i].getBoundingClientRect();"
" out.push({"
" text: matches[i].innerText,"
" tagName: matches[i].tagName,"
" src: matches[i].href,"
" boundingRect: [r.top, r.left, r.width, r.height],"
" accessKey: matches[i].getAttribute('accesskey'),"
" target: matches[i].getAttribute('target')"
" });"
"}"
"return out;})()"
);
return
script
;
}
messageviewer/src/viewer/webengine/mailwebengineaccesskeyutils.h
0 → 100644
View file @
2bbe014b
/*
Copyright (c) 2016 Montel Laurent <montel@kde.org>
This program is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License, version 2, as
published by the Free Software Foundation.
This program is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
You should have received a copy of the GNU General Public License along
with this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#ifndef MAILWEBENGINEACCESSKEYUTILS_H
#define MAILWEBENGINEACCESSKEYUTILS_H
#include <QString>
namespace
MessageViewer
{
namespace
MailWebEngineAccessKeyUtils
{
QString
script
();
}
}
#endif // MAILWEBENGINEACCESSKEYUTILS_H
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment