Designer News
Where the design community meets.
scroll to 17:27
You know who was creative? My immigrant mother who raised three kids on an seamstresses salary. You haven't earned it.
Awesome. I didn't know (I guess I've never made a repost before). Got the idea from the flatvsrealism.com repost. That one must've somehow ignored your notification.
Sorry for suggesting an already implemented feature. I'll try to do my research a bit better next time!
You know what I'd like? If the new story page would notify people that their post might be a repost. Doesn't have to be fancy, just something like this:
https://dl.dropboxusercontent.com/u/802078/Screenshot.png
The code I used for the test in the screenshot is pretty simple. You can try it out using this snippet: (paste and run in your developer tools console at the submit page, and then fill out the form!)
function checkExistingResultCount(event) { var searchString = event.target.value, target = $(event.target), log = $('#log-' + event.target.id), log = log.length ? log : target.after('<div id="log-' + event.target.id + '"></div>').next(), type = target.is('#StoryTitle') ? 'post\'s title' : 'posted URL', searchableString = searchString.replace(/ /g, "+").replace("http://",""), query = "https://news.layervault.com/search?utf8=%E2%9C%93&query=" + searchableString + "&commit=Search", printResultCount = function(html) { var resultString = $(html).find('.SearchResults').text(), resultCount = resultString ? Number(resultString.match(/\d+/)[0]) : 0; log.html("<p>We've found " + resultCount + " result" + (resultCount === 1 ? "" : "s") + " for " + searchString + " (check the <a href='" + query + "'>search page</a>).</p>") }; $.get(query, printResultCount); } $('#StoryTitle, #StoryUrl').on('blur', checkExistingResultCount);
Thanks for linking to my post, Ryan. Good to see people still remember that one.
I haven't tested George's code, but I like the idea of linking to the external script file. And his approach is a bit more straight forward. I went with triggering fake clicks to switch between colors, whereas George just replaces the content of the <div class="Cell"></div>
elements.
I like how you didn't just create a dropdown badge selection menu but put some thought and smartness into the process!
P.S.: The link at the 'Show DN' badge explanation is the same as the 'Discussion' one.
I haven't any colors available in my profile, so I wasn't really able to test that. Maybe, some day, when I've obtained some of those fancy colors, I'll update the tool and incorporate those.
Sorry about the late reply and I'm glad to hear I didn't accidentally ruin your avatar.
P.S. If you're only using black and white, there's no need to clear the old one.
Thanks!
I've noticed some delays in the avatar updates as well. I guess it's a combination of the server having to process the form input and some caching on the client side. Sometimes a hard refresh will help.
Hi Tommy,
No worries, my explanation wasn't that clear so it's understandable you need some more help.
You can paste the code in your browser's Developer tools which can be opened by pressing CMD+ALT+i on a Mac or CTRL + SHIFT + i on Windows. The console tab has a text input in which you can paste the code.
Hope that helps.
Designer News
Where the design community meets.
Designer News is a large, global community of people working or interested in design and technology.
Have feedback?
Relevant response by Paul Irish: