@RybaRacj

Мне нужно взять код странницы, там вызвать функцию и запустить код в Webview. Как отключить css в webview?

@Override

			public void onResponse(String _param1, String _param2, HashMap<String, Object> _param3) {
				final String _tag = _param1;
				final String _response = _param2;
				final HashMap<String, Object> _responseHeaders = _param3;
				code = _response.replace("<link rel='stylesheet' id='theme-style-min-css' href='https://obrazovaka.ru/wp-content/themes/edu/css/style.min.css?ver=1671792173' type='text/css' media='all' />", "<link rel='stylesheet' id='theme-style-min-css' href='https://obrazovaka.ru/wp-content/themes/edu/css/style.min.s?ver=1671792173' type='text/css' media='all' />");
				html = code.concat("function() {\n    'use strict';\n    document.head.innerHTML+='<style>[data-correct=\"1\"]+label{color:#000!important;outline-width:2px!important;outline-color:#00ff00!important;outline-style:dashed!important;outline-offset:3px!important;padding-left:3px!important;font-style:italic}</style>'\n    // gg ez\n})();");
				webview1.getSettings().setCacheMode(WebSettings.LOAD_NO_CACHE);
				webview1.loadData( html, "text/html; charset=utf-8", "UTF-8");
			}
  • Вопрос задан
  • 38 просмотров
Пригласить эксперта
Ваш ответ на вопрос

Войдите, чтобы написать ответ

Войти через центр авторизации
Похожие вопросы