Jump to content

nsane DragScript and more by TrojanK


TrojanK

Recommended Posts

A fork 😀

Spoiler

<!DOCTYPE html>
<html>
	<head>
		<meta http-equiv="content-type" content="text/html; charset=utf-8">
		<title>BOM Remover</title>
		<link rel="icon" type="image/x-icon" href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAABhklEQVRYhcWWO0sDQRRGhyikCUQQwUojBBFrE0WSRisLMY0QlIBYpTBY+w9EGwsR7EULwU4LK7GTFFqINnYKKmghPggqrt9ld2GUcWbdnceFU+3MfGdn9nGZ53lMF6gimAC9kedoDJ8HXsAX2AMZKwKoNnDLCYTs2BIoCsLDnei0IdD4Q4AYsyGwKxGYMiqA6gZvEoERYwKoFNiXhH+ADpMCy5Jw4kC5RoLwmiKcKBkRQI2CliL8DOQEZBMJoHrAfYS7l3EOyv8WQA2Ay4Th/AM6TIsOgVWwJqDGPe2L4EVTeMgRLX6jGESCk5qDQ55YhEEVUDckcOVaYMOlAL3GXa53IOtaIO/6CNIuBdaDb4wzgapI4AI8uBI45jqcdwsChd8CJ8xvr3Pg07DANveD+3HhGrxaOIISL/CsGDwOZjUL9PMCc6AJTgVsBseSAVuC3YnDHUjH6oiY/+GgHVlh/hsTR2BBZ1c8CJbAIVM3K49gRltXLJBpB32gDKrB0RLTzG/lUqJ53yIDaW5dr0EQAAAAAElFTkSuQmCC" id="Favicon">
		<style type="text/css">
			body {
				font-family: Helvetica, Arial, sans-serif;
				color: black;
				background: white;
				font-size: 1em;
			}
			form {
				margin: 0;
			}
			h1 {
				font-family: Helvetica, Arial, sans-serif;
				line-height: .85em;
				margin-bottom: .33em;
				padding-bottom: 0;
				border-bottom: #c0c0c0 1px solid;
			}
			textarea {
				background: #eeeeff;
				border: none;
				padding: 10px;
			}
			#footer {
				font: italic 90% Helvetica;
				color: #202020;
				border-top: 1px solid #c0c0c0;
			}
			#footer p {
				margin: 0 0 1em 0;
				color: #202020;
			}
			#footer img {
				float: right;
				margin: 0 0 .5em 2em;
			}
			.content {
				width: 740px;
				margin: 0 auto;
			}
		</style>
		<script type="text/javascript">
			var txt, ival, bc, tbox;
			function reveal() {
				txt = document.getElementById('txtarea');
				ival = txt.value;
				if (ival != '') {
					txt.value = ival.replace(//g, '%EF%BB%BF');		<!--/BOM/-->
					bc = (txt.value.match(/\%EF\%BB\%BF/g) || []).length;
					bcount();
				}
				else {
					bc = 0;
					bcount();
				}
			}
			function sncopy() {
				txt = document.getElementById('txtarea');
				ival = txt.value;
				if (ival != '') {
					txt.value = ival.replace(/|\%EF\%BB\%BF/g, '');		<!--/BOM|-->
					navigator.clipboard.writeText(txt.value);
					bc = (ival.match(//g) || []).length + (ival.match(/\%EF\%BB\%BF/g) || []).length;	<!--/BOM/-->
					bcount();
				}
				else {
					bc = 0;
					bcount();
				}
			}
			function bcount() {
				tbox = document.getElementById('txtbox');
				tbox.value = bc;
			}
		</script>
	</head>
	<body>
		<div class="content">
			<form onsubmit="return false;">
				<h1>BOM Remover</h1>
				<textarea cols="90" rows="10" id="txtarea" placeholder="Insert text here..."></textarea>
				<br>BOM count:&ensp;<input readonly type="text" id="txtbox" style="text-align: center"/>
				<p><div align="center">
					<input type="button" onclick="reveal()" value="&emsp;R&thinsp;e&thinsp;v&thinsp;e&thinsp;a&thinsp;l&emsp;"/>&ensp;
					<input type="button" onclick="sncopy()" value="&emsp;S&thinsp;c&thinsp;r&thinsp;u&thinsp;b&ensp;&&ensp;C&thinsp;o&thinsp;p&thinsp;y&emsp;"/>&ensp;
					<button type="reset"/>&emsp;R&thinsp;e&thinsp;s&thinsp;e&thinsp;t&emsp;
				</div></p>
			</form>
			<div id="footer">
				<p>&nbsp;</p>
				<p>Posted on <!--%DateStamp%-->23.11.2018<!----><br>Updated on <!--%DateStamp%-->29.11.2018<!----></p>
			</div>
		</div>
	</body>
</html>

 

To test, find "hidden characters" 👇 "Byte Order Mark"

Spoiler

 

 

Edit:

Tested 🧐 and working 🤩 on Firefox v63.0.3 and Chrome v70.0.3538.110, on Win10 v1803.

Download: BOM remover.txt

SHA-256: fdde9bdad085489e61d9345357b20659a7daa56c3f2e077254c7851c8b49dd6e

See me play with it 👇

Spoiler

 

 

Link to comment
Share on other sites


3 hours ago, TrojanK said:

A fork

 

Is it possible to have an userscript that automatically removes the bogus chars from the text copied to clipboard?

If modifying the clipboard is not possible having a script to search the <body> element for bogus chars and remove them from the page.

Link to comment
Share on other sites


  • 2 months later...
  • Administrator

@Kalju: Can you modify this in a way where a member can un-sharecode an already sharecoded link by pasting in it. Currently the Undo button only works if you have sharecoded the link yourself. There should be a Un-sharecode button for users to remove the sharecode they have found posted by another member.

 

Another feature I would like to request is the ability to sharecode multiple links together, but that's not really important thing.

 

If it's possible to do so.

  • Like 1
Link to comment
Share on other sites


  • Administrator
On 2/24/2019 at 4:30 AM, Kalju said:

I'll make next changes if it is clear, that this is enough good place, at least as long as I have discovered how to make it as normal CKEditor feature.

Currently I don't have any good idea, but maybe after some time have it. Still let it be there and like I said, I'll, I want to hide it by default.

There will stay only some kind button or icon.

 

Ideally yes, it's taking a lot of space and a spoiler type button or a proper button inside the editor would be good here.

  • Like 2
Link to comment
Share on other sites


  • 1 month later...
  • 2 months later...

Deleted

Edited by Kalju
  • Like 2
Link to comment
Share on other sites


  • 6 months later...
17 minutes ago, TrojanK said:

DragScript v16jan2020

Download: DragScript.txt

SHA-256: F34242B6D0701BEC78786AA75EEC3E322F759A1BCFC5C6E7F01A8A0F46D0F51D

 

Thanks @JeepWillys58 for reporting bug.

Hi dear friend @TrojanK,

 

I will be at your disposal whenever possible my friend, I update and test it right now and works perfectly.

 

Thanks for the quick and efficient feedback and correction, as always you do your best everytime.

 

Proof:

 

2020_01_16-DragScript-Test-Selection.thumb.PNG.5ff8b46e71fc6307e61a7229de646e8d.PNG2020_01_16-DragScript-Test-Download.PNG.0511eabfe430f89f21fa37a21d55483d.PNG

Best Regards!

Edited by JeepWillys58
Clean personal info
Link to comment
Share on other sites


DragScript v25jan2020

Download: DragScript.txt

SHA-256: 5506E5AF673E2F99F53309DD683B17A78C26F1C5276FED0E21BFEFA8D2355FBF

SHA-256: EA52704CAFD0FF89CE8584095B11A366C8EEB8A13C864544245358200C96F6EE

Edited by TrojanK
😉
Link to comment
Share on other sites


  • TrojanK changed the title to nsane DragScript by TrojanK
  • 3 weeks later...
  • 4 weeks later...
JeepWillys58
23 hours ago, TrojanK said:

DragScript v20mar2020

Download: DragScript.txt

SHA-256: 5D129C21CF6DC9D94464667F5897A8CF90A22BD5C8E3B60F6B1C13E7A7393992

 

Added support for 2 more rare types of sharecodes

  Reveal hidden contents

OEDkeNT.gif

 

Dear firend @TrojanK,

 

Would it be possible for you to implement in this script the ability to check this topic and notify you when there are updates?

 

Thank you in advance for your excellent work.

 

A big hug.

 

Regards

Link to comment
Share on other sites


1 hour ago, JeepWillys58 said:

A big hug

Namaste 🙏

 

A notification for new posts? You can follow this topic for that 🙂

 

Update(s) will be posted if they decide to change "sharecode" to something else.

  • Like 3
Link to comment
Share on other sites


  • 5 weeks later...
JeepWillys58
2 hours ago, TrojanK said:

DragScript v20apr2020

 

2 hours ago, TrojanK said:

DragScript v20apr2020

Download: DragScript.txt

SHA-256: F1DF9ECF82E3748C70C00A68E7146C0EFC92EA60D72BDCA67540052866EA7C10

 

Added support for 1 more type of sharecode

  Hide contents

YB3kD6g.gif

 

Thanks dear friend @TrojanK,

 

It is working perfectly, as expected. You always do a Great job.

 

Can I ask about if you have any update to a BOM remove too? The last is the 2018/11/29?

 

image.thumb.png.9fe7a2c4a62118f9fefdb450fd847039.png

Thanks in advanced.

 

Best Regards!

@JeepWillys58

Link to comment
Share on other sites


  • TrojanK changed the title to nsane DragScript and more by TrojanK

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...